Trendoscope

Aligned Moving Average Filter

Trendoscope Wizard Updated   
This is another adoption of Aligned Moving Average index study published earlier:


Instead of summing up the aligned moving average strength, here we are checking the max and min values from X bars. If maxValue is above threshold, we show bullish bias by coloring candles lime. Similarly if minValue is below threshold we show bearish bias by coloring candles orange. If the max and min signals are mixed - showing both bullish and bearish or showing neither bullish or bearish, then we do not have any bias and candles are colored in silver.

Parameter descriptions are as below:

Moving Average Type : Select moving average type to calculate moving average alignment index
LookbakPeriod : Periods to calculate min and max values
Threshold : Percentage less/more than min/max values of alignment index. At present, max value of alignment index is 36. Hence, 25 threshold will consider max ma alignment index above 27 as bullish and min alignment index below 9 as bearish
Filter type : allows you to use only bullish or bearish filter.
If bullish type is selected, then candle colors are based only on the maxValue of moving average alignment. Candle color will be lime if above threshold and silver otherwise.
If bearish type is selected, then candle colors are based only on the minValue of moving average alignment. Candle color will be orange if below threshold and silver otherwise.
Release Notes:
Add extreme conditions where maxValue is less than minThreshold and minValue is more than maxThreshold. candles will be colored in Green and Red instead of lime and orange in such scenearios.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?