kurtsmock

MAs - A Bridge Too Far

kurtsmock アップデート済   
I scoured the internet and found all the ways someone can make an average.
Then I scoured all of TradingNiew to find all the things that people like moving averages to do.
Then I tried to come up with the different ways averages get applied to charts.
I put it all together and here it is.


Script Modes
  • 6 Unique, Independent Moving Averages
  • 18 line Ribbon
  • 3 line Envelope

Moving Average list
  • SMA
  • EMA
  • Double EMA
  • Triple EMA
  • Zero Lag EMA
  • ALMA (Default Attribute Values: (1) Offset: 0.85 (2) Sigma: 6)
  • Elastic VWMA
  • Fractal AMA (Default Attribute Values: (1) SC: 1 (2) FC: 200) |
  • Grover LSMA
  • Hull MA
  • Jurik MA (Default Attribute Values: (1) Phase: either: <-100, >100, or -99 to 99 (2) Power: 2)
  • Kauffman AMA (Default Attributes: (1) Fast: 2 (2) Slow: 30)
  • LSMA (Default Attributes: (1) Offset: 0 )
  • RMA
  • SMMA
  • Triangluar MA
  • Trend Regularity AMA
  • Volatility AMA
  • VWMA
  • WMA

Moving Average Options
  • Length
  • Type
  • Source
  • Offset
  • Timeframe
  • Attribute One - For use if chosen moving average has additional inputs
  • Attribute Two - For use if chosen moving average has two additional inputs

Override Options
The Ribbon - The ribbon is made of of 19 moving averages with the primary source being the center moving average, which is customized via the settings of Moving Average One. The moving average lengths used for the ribbon are displaced positively and negatively in percentages around Moving Average One (the center ma). The percentage difference between can be between 1% and 10% (0.01 - 0.10). This is changed in the "Displacement Between MAs" setting.

The Envelope - The Envelope is made up of an average (Moving Average One), an upper line, and a lower line. The upper and lower boundaries can be defined by Percent (Pct), Standard Deviation (BB), or ATR.

The Gradient - Since Envelopes and Guppies are used to determine trend, I added the colorization of trend. This is established through the use of the RCI. The RCI uses the same length as the moving average. RCI stands for Rank Correlation Index. There are multiple ways of calculating this. I am using the Spearman Rank Correlation Coefficient. What it basically does is rank the bars based on their close price (highest to lowest). The progression of that rank places it in context of the rest of the bars being ranked. If you take 20 bars, one is the highest and one is the lowest. And when plotted individually and taken together you use this to derive a value between -100 and 100 that describes the slope of the sample. For more information read the article
www.mql5.com/en/articles/5481

tldr; 100 = Max uptrend. -100 Max downtrend about + 10 to - 10 is neutral. The gradient on the envelope and ribbon goes red to green based on the RCI value.

Other -
Just for fun I included the option to color bars based on the RCI. I just got this gradient working (thanks to another TV user) and I thought it was fun.

Let me know what you think
リリースノート:
_solvebarsback function

保護スクリプト
このスクリプトは保護スクリプトとして公開されていますが、利用することができます。お気に入りに登録してチャート上でご利用頂けます。但しこのスクリプトのソースコードを閲覧したり変更することはできません。
免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?