OPEN-SOURCE SCRIPT

ATR Based EMA Price Targets [SS]

Steversteves의
As requested...

This is a spinoff of my EMA 9/21 cross indicator with price targets.
A few of you asked for a simple EMA crossover version and that is what this is.

I have, of course, added a bit of extra functionality to it, assuming you would want to transition from another EMA indicator to this one, I tried to leave it somewhat customizable so you can get the same type of functionality as any other EMA based indicator just with the added advantage of having an ATR based assessment added on. So lets get into the details:

What it does:
Same as my EMA 9/21, simply performs a basic ATR range analysis on a ticker, calculating the average move it does on a bullish or bearish cross.

How to use it:

So there are quite a few functions of this indicator. I am going to break them down one by one, from most basic to the more complex.

Plot functions:

EMA is Customizable: The EMA is customizable. If you want the 200, 100, 50, 31, 9, whatever you want, you just have to add the desired EMA timeframe in the settings menu.

Standard Deviation Bands are an option: If you like to have standard deviation bands added to your EMA's, you can select to show the standard deviation band. It will plot the standard deviation for the desired EMA timeframe (so if it is the EMA 200, it will plot the Standard Deviation on the EMA 200).

Plotting Crossovers: You can have the indicator plot green arrows for bullish crosses and red arrows for bearish crosses. I have smoothed out this function slightly by only having it signal a crossover when it breaks and holds. I pulled this over to the alert condition functions as well, so you are not constantly being alerted when it is bouncing over and below an EMA. Only once it chooses a direction, holds and moves up or down, will it alert to a true crossover.

Plotting labels: The indicator will default to plotting the price target labels and the EMA label. You can toggle these on and off in the EMA settings menu.

Trend Assessment Settings:

In addition to plotting the EMA itself and signaling the ATR ranges, the EMA will provide you will demographic information about the trend and price action behaviour around the EMA. You can see an example in the image below:

스냅샷

This will provide you with a breakdown of the statistics on the EMA over the designated lookback period, such as the number of crosses, the time above and below the EMA and the amount the EMA has remained within its standard deviation bands.

Where this is important is the proportion assessment. And what the proportion assessment is doing is its measuring the amount of time the ticker is spending either above or below the EMA.

Ideally, you should have relatively equal and uniform durations above and below. This would be a proportion of between 0.5 and 1.5 Above to Below. Now, you don't have to remember this because you can ask the indicator to do the assessment for you. It will be displayed at the bottom of your chart in a table that you can toggle on and off:

Example of a Uniform Assessment:

스냅샷

Example of a biased assessment:

스냅샷

Keep in mind, if you are using those very laggy EMAs (like the 50, 200, 100 etc.) on the daily timeframe, you aren't going to get uniformity in the data. This is because, stocks are technically already biased to the upside over time. Thus, when you are looking at the big picture, the bull bias thesis of the stock market is in play.

But for the smaller and moderate timeframes, owning to the randomness of price action, you can generally get uniformity in data representation by simply adjusting your lookback period.

To adjust your lookback period, you simply need to change the timeframe for the ATR lookback length. I suggest no less than 500 and probably no more than 1,500 candles, and work within this range. But you can use what the indicator indicates is appropriate.

Of course, all of these charts can be turned off and you are left with a clean looking EMA indicator:

스냅샷

And an example with the standard deviation bands toggled on:

스냅샷



And that, my friends, is the indicator.
Hopefully this is what you wanted, let me know if you have any suggestions.

Enjoy and safe trades!





Moving Averages
Steversteves
Premium indicators and content have launched! Get access at: patreon.com/steversteves

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항