OPEN-SOURCE SCRIPT

Heikin Ashi Overlay Suite

115
Heikin Ashi Overlay Suite is designed to give traders more control and clarity when working with Heikin Ashi candles — whether you're analyzing trend strength, reducing chart noise, or simply improving your visual read of market momentum. It works by layering multiple types of HA overlays and color systems on top of your standard candlestick chart — without switching chart types. With dynamic gradient coloring, smoothing options, and a predictive line tool, this script helps you see not just what the current trend is, but how strong it is, and what it would take to reverse it.

Heikin Ashi candles help reduce noise but this script goes further by:
➡️adding color intelligence that shows trend strength using a streak counter
➡️uses smoothing logic to clean up chop and whipsaws
➡️introduces a predictive close line — a subtle but powerful guide for anticipating trend flips before they happen

Everything is configurable: colors, candle sources, overlays, predictive tools, and line styles. It’s built for traders who want visual speed, but don’t want to sacrifice signal quality.

At its core, the script offers two powerful dropdown controls:

💥HA Color Scheme (Colors Regular Candles) — Applies Heikin Ashi-derived coloring to your regular candles based on trend direction or streak strength. This gives you instant visual context without switching to a separate chart type.

💥HA Candle Overlay Mode — Overlays actual Heikin Ashi-style candles directly on top of your chart, using your preferred source:

➡️Custom HA candles using internal formula logic
➡️TradingView’s built-in Heikin Ashi source with your own colors

➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
🎨 Custom + Gradient HA Coloring🎨

See trend strength at a glance:
➡️1–4 bar streaks → lighter tone
➡️5–8 bars → medium tone
➡️9+ bars → bold tone, ideal for momentum-based entries, exits, or scaling strategies

→ Choose from:
➡️Your own custom color set
➡️A simple 2-color base mode
➡️Or a 3-level gradient for progressive trend analysis (using the streak counter)

🏛️ TradingView Official Heikin Ashi Overlay

Prefer native HA candles but want your own colors?
This mode plots TradingView's Heikin Ashi source, with your personal bullish/bearish color scheme.
➡️Ensures consistency with built-in charts while still leveraging your visual style.

🌊 Smoothed Heikin Ashi Candles — Clarity in Chaos🌊

These aren’t your standard HA candles. Smoothed Heikin Ashi uses a two-step EMA process to transform chaotic price action into a cleaner, slower-moving trend structure:

🔹 First, it smooths the raw OHLC data using EMA — filtering out minor price fluctuations.
🔹 Then, it applies the Heikin Ashi transformation on top of the smoothed data.
🔹 Finally, it applies a second EMA smoothing pass to the HA values — creating ultra-smooth candles.

📈 What You See:

Trends appear more fluid and consistent.
Choppy ranges and fakeouts are visually suppressed.
Minor pullbacks within a trend are de-emphasized, helping you avoid premature exits.

🎯 Best For:

Swing traders looking to stay in positions longer.
Intraday traders dealing with volatile or noisy instruments.
Anyone who wants a "trend map" overlay without the distractions of raw price action.

✅ Reduces whipsaws
✅ Delivers high-contrast trend zones
✅ Makes reversals more visually apparent (but with a slight lag)

📍 Predictive Close Line📍

Shows where the real close must land to flip the current HA candle's color.

✅ Use it like predictive support/resistance
✅ Know if the trend is actually at risk
✅Visualize potential fakeouts or confirmation

Color-coded based on current HA direction (bullish, bearish, or neutral).

📈 Tick by tick & bar-to-bar Plots📈

Provides 2 plot types:
1)1 plot that tracks a bar tick by tick
2)another plot that tracks the close from bar to bar

For the bar to bar plot, you can choose between 2 options:

✅Full Plot — continuous line colored by HA trend
✅Recent Segments — color just the last few bars (configurable) to reduce chart clutter
✅ Customize width, number of bars, and visibility

➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
📘 How to Use this script📘

Imagine you're watching a choppy 15-minute chart on a volatile crypto pair — price action is messy, and it’s hard to tell if a trend is forming or just noise.

Here’s how to cut through the chaos using Heikin Ashi Overlay Suite:

🔹 Step 1: Enable "Smoothed HA Candles"
Start by turning on the smoothed candles. You’ll immediately notice the noise fades, and broader directional moves become easier to follow. It's like switching from static to clean trend zones.

🧠 Why: Smoothed HA uses a double EMA process that filters out small reversals and lets larger moves stand out. Perfect for sideways or jittery charts.

🔹 Step 2: Watch the Color Gradient Build
As the smoothed candles begin to align in one direction, the gradient coloring (1–4, 5–8, 9+ streaks) gives you an at-a-glance visual of how strong the trend is.

✅ If you see 9+ same-colored candles? You’re likely in a mature trend.
✅ If it resets often? You’re in chop — consider staying out.

🔹 Step 3: Use the Predictive Close Line for Anticipation
Now here’s the edge — this line tells you where the candle would have to close to flip colors.

📉 If price is hovering just above it during a bullish run — momentum may be weakening.
📈 If price bounces off it — the trend may be strengthening.

This is excellent for confirming entries, exits, or spotting early warning signs.

🔹 Step 4: Switch Between Candle Modes as Needed
You can flip between:

✅ Custom HA: Gradient candles with your colors
✅ TradingView HA: The official source with your styling
✅ None: Just color regular candles using the HA logic

Use what fits your style — everything is modular.

🔹 Step 5: Tune It to Your Chart
Lastly, tweak streak thresholds (currently only can do this within the source code), smoothing lengths, and line styles to match your timeframe and strategy.

🎯 Tailor The Settings to Fit Your Trading Style🎯

🔹 🧪 Scalper (1–5 min charts)
If you’re trading fast intraday moves, you want quicker responsiveness and less lag.
Try these settings:

🔸Smoothing Lengths: Use lower values (e.g. len = 3, len2 = 5)
🔸Candle Mode: Use Custom HA or TV’s HA for real-time color flips
🔸Predictive Close Line: Great for ultra-fast anticipation of color reversals
🔸Line Mode: Use Recent Segments mode to track short bursts of trend
🔸Colors: Use high-contrast, opaque colors for clarity

✅ These settings help you catch micro-trends and flip signals faster, while still filtering out the worst of the noise.

🔹 🧪 Swing Trader (30m–4h charts and beyond)
If you’re looking for multi-hour or multi-day trend confirmation, prioritize clarity and staying in moves longer.
Recommended setup:

🔸Smoothing Lengths: Medium to high values (e.g. len = 8, len2 = 21)
🔸Candle Mode: Use Smoothed HA Candles to block out intrabar chop
🔸Gradient Colors: Enable to visualize trend maturity and strength
🔸Predictive Close Line: Helps confirm trend continuation or spot early reversals
🔸Line Mode: Use Full Plot Line for clean HA-based trend tracking

✅ These settings give you a calm, clean view of the bigger picture — ideal for holding positions longer and avoiding early exits.

🔧 This script isn’t just a chart overlay — it’s a visual trend engine.🔧

Ideal For:
🔶 Trend-followers who want clean, color-coded confirmation
🔶 Reversal traders spotting exhaustion via predictive flips
🔶 Scalpers filtering noise with lighter smoothing
🔶 Swing traders using smoothed visuals to hold longer

📌 Final Note

Heikin Ashi Overlay Pro is designed to help you see momentum, trend shifts, and market structure with greater clarity — not to predict price on its own. For best results:

✔️ Combine with support/resistance, moving averages, or price action patterns
✔️ Use Predictive Close as a confirmation tool, not a signal generator
✔️ Pair gradient colors with structure to gauge trend maturity
✔️ Always zoom out and check higher timeframes for context

🧠 Use this as part of a layered approach — not a standalone system.

🙏 Credits🙏

⚡HA logic based on SimpleCryptoLife
⚡Smoothed HA concept adapted from a script by Jackvmk

💡💡💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.💡💡💡

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.