OPEN-SOURCE SCRIPT
Atualizado

Phantom Chart

441
Phantom Chart — Overlay Any Chart Style While Keeping Real Prices

Phantom Chart draws an alternative chart visualization on top of your existing chart — without changing the real prices your other indicators depend on. Most indicators and drawing tools read the chart's Open, High, Low, and Close, so switching your base chart to Heikin Ashi or another modified style quietly feeds them altered values instead of real ones.

Phantom Chart solves this: keep your base chart on Bars or standard Candles so everything else still reads true prices, then let Phantom Chart render whatever view you actually want to look at on top — Heikin Ashi, a clean line, an area, a baseline, a histogram, and more. You get the visual you read best, and your stops, targets, Fib tools, and other indicators all keep working off real prices.

Available Chart Styles
  • Candles
  • Bars
  • Heikin Ashi
  • Line
  • Step Line
  • Area
  • Baseline
  • Line with Markers
  • Columns
  • Histogram


Heikin Ashi Enhancements
HA is the headline use, so it gets dedicated tools:
  • Double Smooth — runs the Heikin Ashi calculation a second time for an even cleaner trend read with almost no noise. Flips are rarer but more reliable.
  • Strong Candles — highlights candles with no lower wick (strong bullish) or no upper wick (strong bearish), the candles that mark the heart of a trending move.
  • Flip Markers — a triangle whenever the candle color changes direction, so you never miss a turn.
  • Streak Counter — a live count of consecutive same-direction candles for gauging trend strength at a glance.


Candle Patterns (Candles / Bars)
  • Inside Bars — marks compression bars sitting fully inside the prior bar's range, which often precede an expansion.
  • Engulfing — marks bars whose body fully engulfs the previous bar in the opposite direction. Bull engulfing below the bar, bear engulfing above.


Baseline Tools
  • Crossover Markers — triangles at each cross of the baseline reference, the core baseline signal.
  • Fill To Baseline — shades green above the baseline, red below, so price position is obvious instantly.


Coloring Modes
  • Direction — each bar colored by close versus its own open.
  • Momentum — each bar colored by close versus the previous close, regardless of the bar's own direction.
  • Trend — colored by whether price is above or below its moving average, with an optional trend line.
  • Single Color — one color everywhere.


More Controls
  • Multi-Timeframe — render any higher timeframe on your chart, with an optional setting to show only fully-closed bars.
  • Volume-Weighted Opacity — fades low-volume bars and keeps high-volume bars solid so the heavy bars stand out.
  • Source Smoothing — optional moving average on the line-style sources.
  • Inverse Chart — flip the chart vertically for an objectivity check: would you take this trade if it moved the other way?
  • OHLC Labels — optional last-bar price labels.
  • Fully customizable colors, widths, wick visibility, and label styling throughout. Every enhancement is an independent toggle, off-by-default where it adds clutter.


Recommended Setup
For accurate visuals, keep your base chart on a standard type (Candles or Bars) and use Phantom Chart for the alternative view. If your base chart itself is set to Heikin Ashi or another transformed type, the overlay will reflect those transformed values rather than real prices — a built-in warning label appears when this is detected.

Tip
You can add Phantom Chart more than once to layer multiple views — for example a Heikin Ashi read alongside a clean line of real closes — each instance with its own settings.

This script is open-source under the Mozilla Public License 2.0.
Notas de Lançamento
New: Candlestick Patterns
  • Added detection for 16 candlestick patterns: Doji, Inside Bar (inside day), Hammer, Hanging Man, Inverted Hammer, Shooting Star, Bullish/Bearish Engulfing, Bullish/Bearish Harami, Morning/Evening Star, Three White Soldiers, Three Black Crows, Piercing Line, and Dark Cloud Cover.
  • Each pattern is individually toggleable and marked with a direction emoji — 🟢 bullish, 🔴 bearish, 🟡 neutral.
  • Detect On source selector: read true OHLC from the base chart (accurate even while viewing the Heikin Ashi overlay) or detect on the displayed candles.
  • Context-dependent pairs (Hammer vs Hanging Man, Inverted Hammer vs Shooting Star) are resolved with a configurable trend-context EMA.


New: Standard Candle Overlay
  • Draws the real standard candles of a detected pattern so the true formation is visible on a Heikin Ashi chart.
  • On Pattern mode redraws the full pattern formation (e.g. all three bars of a Morning Star); All Bars mode overlays real candles everywhere.


New: Divergence Detection
  • Regular and hidden bullish/bearish divergence between price and a selectable oscillator (RSI, MACD, Stochastic, CCI, MFI).
  • Confirmed on pivots with configurable left/right lookback; optional lines connecting the pivots.
  • Runs on real price by default so the signal is independent of the Heikin Ashi overlay.

Notas de Lançamento
Fixed plotting bug.

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.