fikira

Dynamic SMA

fikira Wizard アップデート済   
This script uses dynamic length to create a different sma type.

The length of the "Dynamic SMA" - "dSMA" can be:
'RSI', 'Stoch', 'ATR', 'MFI' or '%R'

For example 'RSI' -> the length of the sSMA will be the RSI itself

The biggest challenge was:
'Pine cannot determine the referencing length of a series. Try using max_bars_back' error

The writer of 'referencing length of a series' issue gave following solution:

bar_index == 0 ? 4999 : len
or in case of values which don't go above 100:
bar_index == 0 ? 100 : len

This assigns the necessary buffer to the function.
I'm most grateful for the given solution!

These dSMA's can give Support/Resistance levels, also crossovers of different dSMA's can give extra information

Examples:


RSI

ATR (close / atr(len)

Stoch

MFI

%R

"show regular SMA" will show the "SMA" with the same length (with default lighter color)
リリースノート:
Updated to v5
Due to evolution in Pine Script™, an error occurred,
should be fixed now.
リリースノート:
Update, bugfix (max len 5000 allowed)
リリースノート:
Further Bugfix, sorry guys!

LuxAlgo Dev: www.luxalgo.com
PineCoder: www.pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -
オープンソーススクリプト

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

免責事項

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

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