OPEN-SOURCE SCRIPT
Doji @ Simple Areas — Strategy (v7)

Twisted FX — Doji @ Simple Areas — Strategy (v7) Educational strategy for standard candles. No financial advice. Use realistic commission + slippage in backtests. For community chat or videos, see the author’s Signature on their profile.
Summary: Doji reversals only where it matters—inside/near ATR-sized supply/demand areas built from swing pivots. Optional quality gating, HTF confluence, and zone-strength scoring help keep the good trades and filter the noise.
What it does
Builds supply/demand areas from swing pivots when the departure is strong enough (ATR-scaled).
Maintains zone lifecycle: tracks touches, confirms retests, expires old zones, and flips a broken zone into the opposite side (optional).
Waits for a doji near/in a zone (strict or loose definition), with optional next-bar confirmation.
Resolves side using (a) which zone you’re closest to, (b) penetration depth, and/or (c) EMA trend.
Optional filters: K-of-4 quality checks, HTF EMA gate, HTF swing-band proximity, and zone strength score.
How signals form
Detect doji (strict: tiny body+both wicks; loose: body ≤ range fraction)
Check near/inside zone (ATR proximity)
Choose side (penetration vs distance; EMA trend optional; prev-candle flip optional)
Optional next-bar confirmation away from the touched zone
Pass quality mode + strength gates; enter at close, stop beyond doji wick (+buffer), TP via RR multiple
Quality modes
Off: widest coverage
Soft: pass K-of-4 (wick rejection, edge-band close, fresh touch, approach impulse)
Strict: auto-tightens thresholds (deeper wick, tighter band, stronger approach, fresher touch) + “rescue” if nearby zone is very strong
Zone strength (0–10)
Based on retests, post-touch reaction, age, and integrity (not broken); separate minimums for Soft/Strict
HTF confluence (optional)
HTF EMA trend gate (longs with uptrend, shorts with downtrend)
HTF swing-band proximity (ATR band around HTF swings)
Defaults are off so you can evaluate the core edge first
Options to play with
Zones/visuals: pivot length, zone half-ATR, min departure, expiry, break tolerance, de-dupe, extend right, Show zones, Hide unconfirmed, nearest-K highlight
Confirmation: retest window (bars), wick-based retest depth (ATR), min bars between signals
Doji rules: strict/loose, body fraction, min range (ATR), near-zone distance (ATR)
Side resolver: use trend (EMAs), use penetration, prev-candle flip, next-bar confirm + confirm ATR
Quality: mode Off/Soft/Strict, K setting, wick penetration ATR, edge-band fraction, approach lookback/min ATR, fresh-touch spacing
Strength gate: min strength Soft/Strict
Risk: RR multiple, stop buffer (micropips/ticks), Fixed qty or Risk % of equity
HTF: timeframe, EMA lengths, swing len, HTF ATR band size
Defaults
Quality mode: Off
HTF trend gate: Off
Show zones: On
Flip on break: On
Tuning tips
Too few trades: Quality → Off/Soft, raise proxATR, lower minRetestsToShow, widen confirm window, enable wick-based retest
Too many losers: try Soft/Strict, raise minStrength*, enable next-bar confirm, raise approachMinATR, enable HTF trend
Confirmed-only is empty: lower minRetestsToShow (e.g., 1) and enable wick-based retest so strong rejections count
Visuals & debug
Toggle “Show zones” and “Hide unconfirmed”; nearest-K highlight brings focus
Debug mode prints veto reasons (quality/HTF/strength/prevFlip/confirm) to help tuning
Notes
Zones come from confirmed pivots; brand-new structure needs a few bars to appear
Research/education only; not financial advice
Changelog (v7.1.5)
Safer arrays, stable nearest-K highlight, strict tuned with rescue, zone-strength consistency loops, defaults set to Quality Off & HTF gate Off, debug veto labels
Keywords
supply demand, doji, wick rejection, ATR, EMA, HTF, RR, confluence, strict filter, zone strength, FX/crypto/indices
Summary: Doji reversals only where it matters—inside/near ATR-sized supply/demand areas built from swing pivots. Optional quality gating, HTF confluence, and zone-strength scoring help keep the good trades and filter the noise.
What it does
Builds supply/demand areas from swing pivots when the departure is strong enough (ATR-scaled).
Maintains zone lifecycle: tracks touches, confirms retests, expires old zones, and flips a broken zone into the opposite side (optional).
Waits for a doji near/in a zone (strict or loose definition), with optional next-bar confirmation.
Resolves side using (a) which zone you’re closest to, (b) penetration depth, and/or (c) EMA trend.
Optional filters: K-of-4 quality checks, HTF EMA gate, HTF swing-band proximity, and zone strength score.
How signals form
Detect doji (strict: tiny body+both wicks; loose: body ≤ range fraction)
Check near/inside zone (ATR proximity)
Choose side (penetration vs distance; EMA trend optional; prev-candle flip optional)
Optional next-bar confirmation away from the touched zone
Pass quality mode + strength gates; enter at close, stop beyond doji wick (+buffer), TP via RR multiple
Quality modes
Off: widest coverage
Soft: pass K-of-4 (wick rejection, edge-band close, fresh touch, approach impulse)
Strict: auto-tightens thresholds (deeper wick, tighter band, stronger approach, fresher touch) + “rescue” if nearby zone is very strong
Zone strength (0–10)
Based on retests, post-touch reaction, age, and integrity (not broken); separate minimums for Soft/Strict
HTF confluence (optional)
HTF EMA trend gate (longs with uptrend, shorts with downtrend)
HTF swing-band proximity (ATR band around HTF swings)
Defaults are off so you can evaluate the core edge first
Options to play with
Zones/visuals: pivot length, zone half-ATR, min departure, expiry, break tolerance, de-dupe, extend right, Show zones, Hide unconfirmed, nearest-K highlight
Confirmation: retest window (bars), wick-based retest depth (ATR), min bars between signals
Doji rules: strict/loose, body fraction, min range (ATR), near-zone distance (ATR)
Side resolver: use trend (EMAs), use penetration, prev-candle flip, next-bar confirm + confirm ATR
Quality: mode Off/Soft/Strict, K setting, wick penetration ATR, edge-band fraction, approach lookback/min ATR, fresh-touch spacing
Strength gate: min strength Soft/Strict
Risk: RR multiple, stop buffer (micropips/ticks), Fixed qty or Risk % of equity
HTF: timeframe, EMA lengths, swing len, HTF ATR band size
Defaults
Quality mode: Off
HTF trend gate: Off
Show zones: On
Flip on break: On
Tuning tips
Too few trades: Quality → Off/Soft, raise proxATR, lower minRetestsToShow, widen confirm window, enable wick-based retest
Too many losers: try Soft/Strict, raise minStrength*, enable next-bar confirm, raise approachMinATR, enable HTF trend
Confirmed-only is empty: lower minRetestsToShow (e.g., 1) and enable wick-based retest so strong rejections count
Visuals & debug
Toggle “Show zones” and “Hide unconfirmed”; nearest-K highlight brings focus
Debug mode prints veto reasons (quality/HTF/strength/prevFlip/confirm) to help tuning
Notes
Zones come from confirmed pivots; brand-new structure needs a few bars to appear
Research/education only; not financial advice
Changelog (v7.1.5)
Safer arrays, stable nearest-K highlight, strict tuned with rescue, zone-strength consistency loops, defaults set to Quality Off & HTF gate Off, debug veto labels
Keywords
supply demand, doji, wick rejection, ATR, EMA, HTF, RR, confluence, strict filter, zone strength, FX/crypto/indices
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.