OPEN-SOURCE SCRIPT

Impulse Candle Acceptance Guard

159
A large candle is easy to spot. The harder question is whether the market accepts it.

Impulse Candle Acceptance Guard follows unusually forceful candles through a defined sequence: detection, continued holding, efficient extension, rejection, full reversal, or an unresolved timeout. It freezes the original candle’s range and ATR reference so later price action is judged against the event that started the observation.

VISUAL GUIDE

• I+ / I− — A bullish or bearish impulse candle entered observation.
• Teal or red zone — The frozen high-low range of the impulse candle.
• Orange line — The acceptance and rejection boundary inside the frozen range.
• Blue line — The minimum extension required beyond the impulse candle.
• A+ / A− — The move satisfied the hold, extension, and path-efficiency rules.
• R — A confirmed close crossed the acceptance line against the impulse.
• X — A confirmed close crossed the opposite edge of the entire impulse candle.
• T — The observation window ended without another terminal result.

The script is intentionally chart-first: it uses no table and has no dependency on another indicator.

1 — DETECT THE IMPULSE

The default setup requires the candle’s range to reach at least 1.5 times the ATR measured on the previous completed bar. Its real body must occupy at least 60% of the candle’s range, and the close must finish within the outer 20% in the direction of the move. Zero-range candles cannot qualify.

An optional volume filter requires current volume to exceed a configurable multiple of its moving average. It is disabled by default so the script also remains usable on symbols without meaningful volume data.

2 — FREEZE THE EVENT

At the confirmed close of a qualifying candle, the script freezes the impulse high, low and close; ATR from the bar immediately before the impulse; the acceptance line inside the impulse range; and the required extension beyond the impulse extreme. These levels remain fixed throughout the observation. Only one episode can be active at a time.

3 — MEASURE ACCEPTANCE

Acceptance requires all three default conditions:

1. Two consecutive closes remain beyond the orange acceptance line in the impulse direction.
2. Price reaches at least 0.25 frozen ATR beyond the impulse high or low.
3. Follow-through efficiency is at least 45%.

Follow-through efficiency compares directional progress from the impulse close with the cumulative close-to-close path traveled after it:

efficiency = max(0, directional progress) ÷ cumulative path × 100

A direct continuation produces a high value. Repeated back-and-forth movement increases the path without producing equal progress and lowers the value. The efficiency value is available in TradingView’s Data Window while an episode is active.

WORKED EXAMPLE

Assume a bullish impulse has a low of 100, a high of 110, a close of 109, and a frozen ATR of 4.

• Acceptance line: 100 + 50% × (110 − 100) = 105
• Required extension: 110 + 0.25 × 4 = 111

If the next two candles close above 105, price reaches 111, and directional progress represents at least 45% of the traveled path, A+ is printed. A close below 105 produces R. A close below 100 produces X and takes priority over the ordinary rejection label.

EVENT PRIORITY AND CONFIRMED-BAR BEHAVIOR

Full reversal has first priority, followed by acceptance-line rejection, acceptance, and timeout. An otherwise valid acceptance on the final permitted bar is recorded before timeout. Wicks alone do not reject or fully reverse an episode; those outcomes require confirmed closes.

Markers and state transitions update only after a candle closes. The script uses no future bars, pivot backdating, or lookahead requests.

USAGE AND LIMITATIONS

The mirrored rules operate on bullish and bearish candles across stocks, cryptocurrencies, futures, and forex. Use standard candles when interpreting the price-based rules. Thresholds describe a rule set rather than probabilities, and their meaning changes with symbol and timeframe.

Acceptance means that the specified conditions were observed; it does not guarantee continued movement or establish a profitable strategy. The indicator does not place trades, calculate position sizes, or model fees, slippage, gaps, liquidity, or execution. Historical results can change when settings, available history, or source data change.

BotTradeLab — Human judgment, AI-assisted analysis.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.