OPEN-SOURCE SCRIPT

Educational Candle & Pattern Explorer v6

96
Educational Candle Pattern Explorer is a teaching-focused overlay indicator that automatically identifies and labels key candlestick patternson your chart — from single-candle "micro" signals (e.g., Shooting Star, Hammer, Engulfing, Doji variants) to basic multi-candle "macro" formations (e.g., potential Double Bottoms via pivot detection).

Core Features & How It Works
- Micro Level (Single-Candle Patterns): Detects classic reversal & indecision candles with customizable sensitivity (wick multiplier, min body % of range). Labels appear pinned directly to candles:
- Bullish patterns (Hammer, Bullish Engulfing, Long-Leg Doji bull bias) → green labels below the candle for clear visibility.
- Bearish patterns (Shooting Star, Bearish Engulfing, Long-Leg Doji bear bias) → red labels above the candle.
- Neutral (regular Doji) → gray labels above.
Tooltips on hover provide detailed explanations (context, implications, best conditions) — perfect for learning while charting.
- Macro Level (Multi-Candle Formations): Experimental detection of Double Bottom candidates using pivot lows (similar levels + separation filter) with educational labels. Includes a persistent reminder note for Cup & Handle patterns (links to popular community scripts like Zeiierman's for full detection).
- User Controls:
- Toggle single-candle vs multi-candle display.
- Limit labels to last N bars (default 60–150) to reduce clutter.
- Wick/body thresholds adjustable.
- Positioning & Readability: Uses `yloc.abovebar`/`belowbar` + explicit `xloc.bar_index` for stable pinning — labels stay attached to candles during zoom, scroll, and price changes (no decoupling on most setups; ensure "Scale price chart only" in Y-axis settings if needed).
- Performance: `max_labels_count=500` & `max_bars_back=1000` for smooth operation on most timeframes/symbols.

Why This Script? (Originality & Usefulness)
Unlike many auto-pattern detectors that just plot shapes or alerts, this one prioritizes education: detailed tooltips explain why a pattern matters (e.g., "Bearish reversal • Small body near low • Long upper wick • Best after uptrend"). It bridges micro (immediate sentiment) to macro (structure over time), helping beginners build intuition and intermediates verify visual analysis. Great for manual traders studying price action without overwhelming the chart.

How to Use
1. Add to chart → adjust inputs (start with defaults).
2. Hover labels for pattern explanations.
3. Use in conjunction with support/resistance, volume, or trend tools (e.g., EMA filter recommended for context).
4. On lower timeframes (1m–15m) → lower `onlyLastBars` to 50–80.
5. Toggle `showMulti` for macro education (better on 1h+ charts).

Limitations & Edge Cases
- Patterns are probabilistic — no guarantees; always confirm with context (trend, volume, S/R).
- Macro detection (Double Bottom) is simplified/stub — not as robust as dedicated "Auto Chart Patterns" scripts; meant as educational prompt.
- High label density on ranging markets → use `onlyLastBars` filter.
- Realtime bars may redraw slightly during fast updates (normal Pine behavior).

Future Iteration Ideas (Open to Community Input!)
- Add more micro patterns: Harami, Morning/Evening Star, Three White Soldiers/Crows, Piercing Line/Dark Cloud Cover.
- Stronger macro: Basic Head & Shoulders, Cup & Handle curvature via regression, or double top symmetry.
- Filters: Trend context (only bullish reversals below EMA), volume confirmation, volatility-adjusted thresholds.
- Alerts: On new patterns or macro setups.
- Strength scoring: Rate patterns (e.g., 1–5 stars) based on wick/body ratio + context.
- Multi-timeframe confirmation (e.g., pattern on 1m matching higher TF structure).

Feedback welcome — publish privately first to test, then go public. Happy charting & learning!

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。