Skip to main content
On this page

Heikin Ashi Smoothed: Distinguish Synthetic Candles from Pineify HAS

· 5 min read
Pineify Team
Pine Script and AI trading workflow research team

Heikin Ashi Smoothed is a name used for several smoothing implementations. Do not assume they share the same formula, outputs, or settings. Pineify's HAS configuration produces two lines and crossover signals; it does not draw the red and green smoothed candles described by some other scripts.

Heikin Ashi Smoothed makes charts way cleaner

Standard Heikin Ashi uses synthetic prices​

Standard Heikin Ashi close is the average of the current open, high, low, and close. Its open uses the previous Heikin Ashi open and close. Its high is the maximum of the current high, Heikin Ashi open, and Heikin Ashi close; its low is the corresponding minimum. Initialization also matters.

Those values are transformed chart data, not necessarily prices at which a trade could execute. A smoothed variant may filter inputs before the transformation, outputs afterward, or both. The name alone is insufficient to identify the calculation.

What Pineify HAS actually calculates​

The current implementation has one calculation input, Length, defaulting to 55. It does not expose an EMA/SMA/Hull selector. It builds one branch from a custom Heikin-Ashi-like value and another from HLC3, applying repeated EMA combinations to both.

The first branch uses a recursive open derived from current OHLC4 and the previous recursive open, with a zero fallback at initialization. That differs from the standard Heikin Ashi open formula above. It then builds a transformed close from OHLC4, the recursive open, and high/low comparisons.

In each branch, a three-stage EMA combination is applied, then applied again to the first combination. The final line is twice the first combination minus the second. This is more specific than adding a single moving average to a Heikin Ashi candle series.

OutputSource and behavior
FastThe processed HLC3 branch
SlowThe processed custom Heikin-Ashi-like branch
Buy SignalFast crosses above Slow
Sell SignalFast crosses below Slow

The Fast and Slow names are output labels; both branches use the same Length input. The drawing configuration plots Fast in red and Slow in blue by default. Those colors identify lines, not bullish and bearish candle states.

Pineify makes creating indicators super easy

Configure and inspect the indicator​

In Pineify's Visual Editor, select Heikin Ashi Smoothed, review Length and line styles, and generate the source. Compile it in TradingView and compare the two lines and crossover events against the expected behavior.

Setting up Heikin Ashi in Pineify is pretty straightforward

Do not add a generic smoothing component and assume the result is this same implementation. If you want a particular smoothed-candle formula, specify that formula in a code workflow and verify its OHLC output separately.

Your finished Heikin Ashi Smoothed indicator

Smoother is not more predictive​

Filtering can reduce visible variation but also change timing and obscure price excursions. Repeated EMA combinations may behave differently from a simple moving average. No preferred timeframe, optimal length, or measured increase in accuracy is established by this article.

The crossover function has no explicit bar-close gate. An open-bar crossing can change as prices update. If the intended strategy acts only on completed candles, apply that policy consistently to conditions, alerts, and simulated orders.

Keep signal values separate from fill prices​

TradingView explains the limits of non-standard chart data. When testing a strategy, distinguish the transformed values used for a signal from the prices used to simulate orders. Synthetic chart prices can make a historical result look executable when it is not.

A HAS crossover is not a complete trading strategy. Define sizing, exits, costs, and handling of gaps and opposite signals. Compare results over a separate evaluation period after choosing parameters. The display does not identify institutional money or guarantee that a trend will continue.

Does Pineify HAS draw smoothed candles?

The current HAS drawing function plots Fast and Slow lines. Its buy and sell outputs are line crossovers.

What is the default smoothing length?

Length defaults to 55. It is a configuration value, not an established optimum for any market.

Can a synthetic Heikin Ashi price be treated as an actual fill?

Not automatically. Use appropriate market-price execution assumptions and distinguish them from transformed signal data.

The Best Pine Script Generator