TheBearFighter

Moving Average Ribbon [TheBearFighter]


This code was written using:
•Pine Script Coding Conventions.

This script provides a very useful tool for new community users and professionals. It puts at your disposal a Moving Average Ribbon by hand to graph and easily find the ones with the highest performance. The creation of this script was motivated because in free TradingView accounts there is a limit of 3 indicators by chart, and with this tool you can draw up to 32 MA's at the same time!

Choose one of 10 types of MA´s:
•KAMA Kaufman's moving average.
•HULL Hull moving average .
•TEMA Triple exponencial moving average.
•LSMA Least square moving average.
•DEMA Double exponencial moving average.
•ALMA Arnaud Legoux moving average.
•WMA Weighted moving average
•EMA Exponencial moving average.
•VWMA Volume Weighted moving average .
•SMA Simple moving average .

Use the tooltips to know the lengths of MA´s.

A main characteristic of the script is that the lengths are in days but when changing the lowest timeframes, the same daily resolution is maintained. This gives us extreme precision in intraday timeframes, e.g 30 minutes.

Once this is understood, we can turning the MA´s on/off, and changing the timeframe to our liking.
Available timeframes: M, W, D, 4H, 1H, 30m, 15m, 5m.

Also the MA´s are colored for easy visualization and know if they grow or decrease.

Thank´s to @midtownsk8rguy to let me know more about HEX colors.

Thank´s to @HPotter for his KAMA .

リリースノート: Less is more :
-TEMA and DEMA were removed (I will create another exclusive indicator for this type).
-The amount of moving averages was reduced from 32 to 20.

Why? creating this script I learned a lot about the limitations of PineScript. I ran into errors like.
-compiled script code is too long: 60001. The limit is 60000.
-maximum number of output series (64) was reached.
-max security call 40. and many others.

So length variables were redefined so that NOW YOU CAN SET YOUR FAVORITE LENGTHS!. With the previous script, if any length was modified, it was completely deconfigured in intraday and the ma colors.
To do that go the section // initial lengths. SET THE LENGHTS YOU USE HERE---{ }

The funtion syminfo.type was added, the available timeframes and lengths are based on the asset class.
A color menu was added for better visualization, in light or dark themes.

If you want to change linewidth go to plot section. //---plots{ }

The most important change of this update is the message shown in intraday time frames. The message guides you how to configure in BARS PER SESSION (settings).

Available timeframe: 2H was added (only for crypto and forex).

Thanks to @Shauryam_or for his Candle Count script used in section //---table{ }
Thanks to @pabloadrianinostroza for motivating me to update this tool and make it useful to analyze stocks in the US and Argentine market.
Thanks to @topo for his feedback.
リリースノート: TEMA and DEMA were added again.
The number of moving averages was increased from 20 to 32 again.
リリースノート: Input source were added. Choose: open, high, low, close, hl2, hlc3, or ohlc4.
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードの公開物での再利用には、ハウスルールに準拠する必要があります。お気に入りに登録してチャート上でご利用頂けます。

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

コメント