SatoshiYoshimura

Swing Highs and Lows (version 2)

My second version of plotting Swing Highs and Swing Lows
A Swing High (SH): a price bar high preceed by two lower highs (LH) and followed by two lower highs (LH)

This version enables you to ignores swing highs and lows when the market volatility is small and not suitable for trading.
Thus it will depict fewer number of SH and SL markers, making the chart a bit cleaner and easier for us to read.
Volatility is measured simply by the amount of pips moved within five consecutive bars: the default is set at 10 pips, meaning that when you take five consecutive bars and the gap of the highest high and the lowest low is less than or equal to 10 pips, it will not depict SH or SL markers.
To use this function, check "set volatility threshold?" box under the Format icon and set a threshold in pips.
(I typically trade EURUSD so the pips input is customized for that)
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?