Heikin Ashi Reality Check: Real Fills Test [forexobroker] — Strategy by forexobroker

By forexobroker

Performance Metrics

Description

Heikin Ashi Reality Check: Real Fills Test [forexobroker]🔶 OVERVIEWHeikin Ashi Reality Check is a strategy that answers one question on your own chart: how much of a Heikin Ashi backtest is real? It runs one simple Heikin Ashi strategy and books the same signals three ways, side by side: at Heikin Ashi prices (what a backtest on a Heikin Ashi chart fills at by default), at real prices with the same orders, and with the "two-chart fix" (Heikin Ashi for the direction, real candles for the entry, stop and target). A table shows all three on four markets at once.Heikin Ashi candles are averages. Their open is the midpoint of the previous Heikin Ashi body, not the price the market opened at, so a backtest that fills orders at Heikin Ashi prices can buy at prices that never traded. This script measures how big that gap is.🔶 THE STRATEGY- Trend: the 50 EMA of the Heikin Ashi close. Above it, buys only; below it, sells only.- Pullback: a red Heikin Ashi candle in an uptrend (a green one in a downtrend).- Signal: the first green Heikin Ashi close after the pullback (red for sells).- Entry at the open of the next candle. Stop at the low of the signal candle (the high for sells). Target 1.5 times the risk.Heikin Ashi is computed from the real candles with the standard formula: close = (open + high + low + close) / 4; open = (previous Heikin Ashi open + previous Heikin Ashi close) / 2; high and low include that open and close. The script computes it itself, so it works on a normal candle chart.🔶 THE THREE LEDGERSA. Heikin Ashi fills: the entry fills at the next Heikin Ashi open, the stop and target are checked against Heikin Ashi candles. This is what TradingView's Strategy Tester books on a Heikin Ashi chart when Properties > "Heikin Ashi mode" is left at "Heikin Ashi bars".B. Real fills: the same orders, the same stop and target levels and the same size, filled at real prices. This is what the Strategy Tester books with "Heikin Ashi mode" set to "Standard bars". Results are in the same R units as A.C. Two-chart fix: the signal still comes from Heikin Ashi, but the entry is the real next open, the stop goes under the real low of the pullback and the signal candle (over the real high for sells), and the target is 1.5 times that real risk. A setup whose real open is already beyond the stop is skipped.Inside a candle the price path follows TradingView's broker emulator: the open, then the nearer of the high and the low, then the other. A stop or target already passed at the open fills at the open. One trade at a time per ledger. R = the result divided by the planned risk.🔶 THE TABLE- One row per market (four inputs, any symbols), plus "All four": wins out of trades and total R for A, B and C.- "Real open worse": how often the real open was worse than the Heikin Ashi open, signal by signal.- The average real risk as a multiple of the Heikin Ashi risk.- The test window (start and end inputs), so the table stays fixed however long the chart stays open.- A note that tells you whether the chart is a Heikin Ashi chart, and what that means for the Strategy Tester.🔶 ON THE CHART- Every signal, with its entry, stop and target lines.- A pane with the real candles under the price chart, so both prices are visible at once on a Heikin Ashi chart.🔶 STRATEGY TESTER SETTINGS (defaults)- Initial capital 10,000; each order risks 1 % of the initial capital (input), sized from the entry-to-stop distance.- Commission 0.01 % per order; slippage 0 ticks (the comparison isolates the fill price; add slippage in Properties for your market).- Over the default test window on the 1-hour chart each market produces between 50 and 100 trades; extend the window for a larger sample.- On a Heikin Ashi chart, set Properties > "Heikin Ashi mode" to "Standard bars" to get real fills (ledger B). On a normal candle chart the tester fills at real prices already.🔶 SETTINGSStrategy- Trend EMA length (50), target in R (1.5), risk per trade for the Strategy Tester (1 %).Test window- Start and end dates (the same for every market).Markets table- Show the table, four markets, text size.Display- Real candles pane, the entry / stop / target lines, signal markers, colours.🔶 LIMITATIONS- The table counts the script's own rules on closed candles at the chart's timeframe; it shows costs only through the Strategy Tester's commission.- Intrabar order is modelled the way TradingView's broker emulator does it; real fills can differ again with spread and slippage.- Results depend on the market, the timeframe and the window. This is an analysis tool, not financial advice, and past performance does not guarantee future results.🔶 RELEASE NOTESv1.0 — Initial release. One Heikin Ashi strategy booked three ways (Heikin Ashi fills, real fills, two-chart fix) on four markets in one table, the real-open check, the real-risk ratio, a real-candle pane and a fixed test window.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView