Shanxia

Supertrend Bands

Shanxia アップデート済   
Supertrend Bands

What is the Supertrend indicator?

"The Supertrend indicator is a trend following overlay on your trading chart, much like a moving average, that shows you the current trend direction.

The indicator works well in a trending market but can give false signals when a market is trading in a range.

It uses the ATR (average true range) as part of its calculation which takes into account the volatility of the market. The ATR is adjusted using the multiplier setting which determines how sensitive the indicator is."

"For the basic Supertrend settings, you can adjust period and factor:

- The period setting is the lookback for the ATR calculation
- Factor is the what the ATR is multiplied by to offset the bands from price"

How to use this indicator

This indicator is inspired by a strategy I found. It includes four Supertrend indicators, each with different settings that displays trend strength and support/resistance zones. The default settings are optimal for cryptocurrency but do work quite well for traditional also. I highly recommend you try experimenting with different settings, increasing them to suit the instrument.

The bands are set from low to high, Band 1 being the fastest and Band 4 being the slowest. Band 4 is the one that sets the overall trend so when price is above Band 4, the trend is bullish and vice versa. Trend is strongest when price is above/below Band 1 and gets weaker as it filters through each band. Band 4 provides the strongest support/resistance and if that breaks the trend flips.

In the menu, you will see an option called "Remove Anti Trend?". It is enabled by default and it removes any bearish/resistance bands when the trend is up and any bullish/support bands when the trend is down. When turned off, it will show all Supertrend Bands as they are by default.

Bar Colors

Bar colors are optional and they reflect the current trend strength based on the Supertrend bands.

Alternate ways of using this indicator

You could leave everything as default or you can display individual bands. For instance, because I use many overlay indicators, most of the time I turn off all the bands and only show bar colors:


You can also turn off Bands 1 and 2 and only show the two slowest lengths:



This removes the noise of the two faster Supertrends.

Or just show the two fastest bands:


Any suggestions to improve this indicator are most welcome :)
リリースノート:
Thank you @kkeskar92 for suggesting adding MTF.
I've added an input which allows multiple timeframes to be chosen.
Because Pinescript's inbuilt resolution function has some glitches with this particular script, each timeframe had to be coded manually.
Let me know if there are other timeframes that should be included.
リリースノート:
Added Alert conditions for overall trend change (band 4). Make sure to select "Once Per Bar Close" in the alert settings otherwise it'll give incorrect alerts before the bar is closed.
リリースノート:
Added more alerts for each band.
オープンソーススクリプト

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

免責事項

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

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