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)
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?