Trendoscope

Aligned Moving Average Index

Trendoscope Wizard 已更新   
Moving averages are considered as aligned when either all faster moving averages are placed above their next slower moving averages or all faster moving averages are placed below their next slower moving averages. In this script, we are considering moving averages of 5, 10, 20, 30, 50, 100 and 200. User can select different moving average types from input : sma, ema, hma, rma, vwma, wma.

Moving average is considered as positively aligned when close > ma5 > ma10 > ma20 > ma30 > ma50 > ma100 > ma200
Moving average is considered as negatively aligned when close < ma5 < ma10 < ma20 < ma30 < ma50 < ma100 < ma200

Whenever there is positively aligned moving average, alignment value is considered as +1 and whenever there is negatively aligned moving average, alignment value is considered as -1. Aligned moving average index is sum of n periods of alignment value.

We can optionally apply another moving average on this index to see the overall direction.



版本注释:
Added option include partial alignment.

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?