PROTECTED SOURCE SCRIPT
Telah dikemas kini 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.
Nota Keluaran
- Current candle is "boring" (ATR > TR).
- Previous candle is "ok legin" (TR[1] > ATR[1] and is at least 1.5× bigger in TR or size).
- Previous legin’s body is at least 45% of its full size.
- Previous legin has a wick on the close side.
- There is no visually significant gap between the previous close and current open (with adaptive threshold).
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
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.