PROTECTED SOURCE SCRIPT
Boring with Ok Legin

This TradingView Pine Script highlights “boring” candles that immediately follow a more moderately strong “legin” candle, using relaxed price action and supply/demand zone criteria.
A candle is highlighted if all these conditions are satisfied:
1. Boring Candle (Current Bar):
- The total wick size (upper + lower) is greater than its body size.
- The candle’s ATR (Average True Range) is greater than its TR (True Range), identifying it as “boring” (constricted movement).
2. OK Legin Candle (Previous Bar):
- The previous candle’s TR is at least 1.5× the current candle’s TR, or its size (high-low) is at least 1.5× the size of the current boring candle (shows moderate expansion).
- The previous candle’s body is at least 45% of its full size (not just all wick).
- The previous candle has a wick on its closing side (indicating some price rejection).
3. No Visual Gap Rule:
- There is no significant gap between the previous legin’s close and the current boring candle’s open.
The allowed gap is adaptive:
Usually 7% of the legin’s body size,
but always at least 0.1×ATR and never more than 2×ATR,
ensuring visual continuity no matter the size of the legin candle.
A candle is highlighted if all these conditions are satisfied:
1. Boring Candle (Current Bar):
- The total wick size (upper + lower) is greater than its body size.
- The candle’s ATR (Average True Range) is greater than its TR (True Range), identifying it as “boring” (constricted movement).
2. OK Legin Candle (Previous Bar):
- The previous candle’s TR is at least 1.5× the current candle’s TR, or its size (high-low) is at least 1.5× the size of the current boring candle (shows moderate expansion).
- The previous candle’s body is at least 45% of its full size (not just all wick).
- The previous candle has a wick on its closing side (indicating some price rejection).
3. No Visual Gap Rule:
- There is no significant gap between the previous legin’s close and the current boring candle’s open.
The allowed gap is adaptive:
Usually 7% of the legin’s body size,
but always at least 0.1×ATR and never more than 2×ATR,
ensuring visual continuity no matter the size of the legin candle.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.