The indicator draws 2-bar William Gunn swings without redrawing, and marks the bar that formed the swing with a breakout of the maximum/minimum with diamonds for convenient visualization of the delay when internal or external barsappear .
Indoor bar: the current High is lower than the previous High and the current Low is higher than the previous Low, such combinations are ignored by the indicator.
External bar: the current High is higher than the previous High and the current Low is lower than the previous Low, with this combination, the breakout of the previous High or Low by the current Close price is counted, the bullish or bearish breakout is determined depending on what price the Close price broke, if there is no breakout, the indicator ignores the external bar.
Bullish swing criteria: the current High and Low is below the previous highest High and Low(normal breakout); or the current Close is below the highest Low(the outer bar where the current High is above the previous highest High and the current Low is below the previous highest Low).
Bearish Swing criteria: the current High and Low are higher than the previous lowest High and Low(normal breakout); or the current Close is higher than the lowest High(the outer bar where the current High is higher than the previous lowest High and the current Low is lower than the previous lowest Low).
[spoiler title=”Read More…”]
Parameters:
- Alerts: true-enable notifications when drawing a new swing; false – disable.
- SignalGap: distance of placemarks(rhombuses) from the candle in points.
[/spoiler]