OPEN-SOURCE SCRIPT

Candle PA Scanner (Engulfing / Inside / Pin) by BK Sahni

84
Here’s how to read the “Candle PA Scanner (Engulfing / Inside / Pin)” and what each input means.

What the signals look like on your chart

B-ENG (label above/below bar)

Bullish Engulfing → “B-ENG” below the bar (green/teal).

Bearish Engulfing → “B-ENG” above the bar (red).

IB (small orange dot at the top)

Inside Bar (compression). Use the mother bar’s high/low for the break.

PIN (triangle)

Bullish Pin → triangle below the bar (long lower wick; rejection of support).

Bearish Pin → triangle above the bar (long upper wick; rejection of resistance).

Treat these as price-action alerts, not automatic buy/sell signals. Act only when they occur at your levels (VWAP band, Fib 38.2–61.8, PDH/PDL, OB/FVG, etc.).

How to trade the prints (quick rules)

A) Bullish Engulfing at support

Context: at VWAP/VAL/0.5–0.618 Fib.

Entry: next candle above the engulfing high (or market order on close if volume/momentum confirm).

Stop: a tick below the engulfing low (or below the level).

Targets: mid/range, VWAP, prior swing; trail with Chandelier/ATR if trend extends.

B) Bearish Engulfing at resistance

Mirror the above: trigger below the engulfing low; stop above its high.

C) Inside Bar

It’s compression. Mark the mother bar’s high/low.

Trade the breakout in the direction of bias (above VWAP for longs, below for shorts).

If the break fails (closes back inside), often sets up a reversal—manage fast.

D) Pin Bar (rejection)

Enter on break of the pin’s body in the direction away from the wick.

Stop beyond the wick tip (invalidated if wick gets closed through).

Scale at VWAP/mid or the opposite range edge.

What the Inputs do (the panel you showed)

Inside Bar lookback (default 1)

How many bars back can be the mother bar.

Keep 1 for strict IB; raise to 2–3 to catch nested/compression patterns (more signals, a bit noisier).

Pin wick:body min ratio (default 2)

How long the rejection wick must be compared to the body.

Higher (2.5–3.0) = pickier, great in chop.

Lower (1.5–1.8) = more pins, useful in strong trends where wicks are shorter.

Min body % of range (0–1) (default 0.25)

Filters out dojis. The body must be at least 25% of the bar’s high-low range.

If you want to allow slimmer bodies (more pins/dojis), drop to 0.15–0.20.

If you want only decisive bodies, raise to 0.30–0.35.

Suggested tuning by market state

Trending / high momentum:

IB lookback 1, Pin ratio 1.8–2.2, Min body 0.20–0.25 (to catch more continuation entries).

Ranging / choppy:

IB lookback 2, Pin ratio 2.5–3.0, Min body 0.30 (fewer, higher-quality reversals).

A simple confluence checklist (use before clicking)

Signal printed at a level (VWAP band, Fib, PDH/PDL, OB/FVG)?

Bias aligned (above VWAP for longs, below for shorts) or you’re intentionally fading a range edge?

For engulfing: did it close through nearby minor structure?

For IB: are you trading the mother bar break, not just the small inside candle?

Risk defined: stop beyond wick/zone, target mapped (mid/VWAP/swing/extension).

Common pitfalls

Taking signals mid-range (low R:R).

Treating an IB as a reversal without a break/shift.

Buying a bullish pin that closed below your level (no acceptance).

Ignoring volatility—during news spikes, patterns fail more often.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.