PROTECTED SOURCE SCRIPT
[NBK] Cover Buy Sell

[NBK] Cover Buy Sell — idea
Purpose
Detect high-quality engulfing turning points, but only when they align with a short-term trend.
Cover Buy = Bullish engulfing / piercing that appears in a short-term downtrend.
Cover Sell = Bearish engulfing (full-candle or body engulf / dark-cloud style) that appears in a short-term uptrend.
Signal logic
Bullish side
Body Engulf: current green body fully covers prior red body.
Piercing (relaxed): prior red → current green closes above prior body midpoint (≤ prior open).
Bearish side
Full Candle Engulf: current red candle (body+wicks) covers the entire prior candle.
Body Engulf: current red body covers prior body.
Dark Cloud (relaxed): prior green → current red closes below prior body midpoint.
Trend model (short-term, non-repainting)
EMA slope is measured between bar-1 and bar-2 and must exceed an ATR-scaled threshold:
Slope < 0 ⇒ downtrend (only Bull signals).
Slope > 0 ⇒ uptrend (only Bear signals).
Quality filters
Body filter: bodies must not be tiny. Compare each body to the average body over a lookback; for Bear signals an alternative check ensures current body ≥ a ratio of the prior body.
Peak filters (Bear only):
High must be far above EMA by a minimum fraction of ATR.
High must be near the local highest within a lookback (current or previous bar).
Close must break prior low by an ATR-scaled amount.
These remove premature “sell” flags in choppy ranges and keep the later, cleaner reversal.
Inputs to tune
lenTrend, slopeAtrPct, atrLen (trend strength)
lenBodyRef, minBodyPct, bearRatioMin (body size)
emaDistAtrMin, nearHighLen, nearHighTol, breakAtrMin (bearish peak confirmation)
Usage tips
To reduce early Cover Sell, raise emaDistAtrMin / nearHighLen / breakAtrMin.
If you miss good tops, nudge those down slightly.
Works on any symbol/TF; signals are evaluated on bar close; no repaint.
Includes alert conditions for both sides.
This is a screening tool, not financial advice. Combine with structure/levels and your risk plan.
Purpose
Detect high-quality engulfing turning points, but only when they align with a short-term trend.
Cover Buy = Bullish engulfing / piercing that appears in a short-term downtrend.
Cover Sell = Bearish engulfing (full-candle or body engulf / dark-cloud style) that appears in a short-term uptrend.
Signal logic
Bullish side
Body Engulf: current green body fully covers prior red body.
Piercing (relaxed): prior red → current green closes above prior body midpoint (≤ prior open).
Bearish side
Full Candle Engulf: current red candle (body+wicks) covers the entire prior candle.
Body Engulf: current red body covers prior body.
Dark Cloud (relaxed): prior green → current red closes below prior body midpoint.
Trend model (short-term, non-repainting)
EMA slope is measured between bar-1 and bar-2 and must exceed an ATR-scaled threshold:
Slope < 0 ⇒ downtrend (only Bull signals).
Slope > 0 ⇒ uptrend (only Bear signals).
Quality filters
Body filter: bodies must not be tiny. Compare each body to the average body over a lookback; for Bear signals an alternative check ensures current body ≥ a ratio of the prior body.
Peak filters (Bear only):
High must be far above EMA by a minimum fraction of ATR.
High must be near the local highest within a lookback (current or previous bar).
Close must break prior low by an ATR-scaled amount.
These remove premature “sell” flags in choppy ranges and keep the later, cleaner reversal.
Inputs to tune
lenTrend, slopeAtrPct, atrLen (trend strength)
lenBodyRef, minBodyPct, bearRatioMin (body size)
emaDistAtrMin, nearHighLen, nearHighTol, breakAtrMin (bearish peak confirmation)
Usage tips
To reduce early Cover Sell, raise emaDistAtrMin / nearHighLen / breakAtrMin.
If you miss good tops, nudge those down slightly.
Works on any symbol/TF; signals are evaluated on bar close; no repaint.
Includes alert conditions for both sides.
This is a screening tool, not financial advice. Combine with structure/levels and your risk plan.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.