Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
In NT8 I have created a new strategy based on Heikin Ashi candles. Now I get profit factors between 4 and 6 on 1 hour durrations (crypto, specified pairs). I have some questions for this:
- I have the feeling this profit factor is too high. Any others have similar results sometimes?
- Is it possible that the default HA is repainting? And is there a solution to resolve this?
Best regards
Can you help answer these questions from other members on NexusFi?
--------------------------------------------------------
- Trade what you see. Invest in what you believe -
--------------------------------------------------------
Standard renko bars and heikin ashi bars are not backtestable with NinjaTrader. This can be easily explained.
Attached is a chart with an example. Let us assume that the long breakout bar in the middle of the chart triggers a long signal and that your strategy enters with a market order. I have labeled the breakout bar "signal bar", because it triggers the signal. For the purpose of a backtest NinjaTrader will then enter a long position at the opening price of the next bar, which is labeled "entry bar".
And here is the problem. Just for the purpose of looking beautiful, Heikin Ashi bars use an artificial opening price, which is the arithmetic mean of the opening price for the prior bar, and the (hidden) opening price of the current bar. The first transaction price for the entry bar is 2765.25. However, the Heikin Ashi open is shown as 2760.25 calculated as the arithmetic mean of the (real) opening price of 2765.25 and the heikin ashi open of the prior signal bar at 2755.25.
For the backtest NinjaTrader uses the fake open of 2760.25. The backtest now accounts for a fake profit of 5 points, as the real entry price would have been 2765.25. However, you won't get that profit in real life. It is just obtained by drawing the bar open.
There are lots of fancy bar types that suffer from the same restriction. Basically the question you need to ask is whether the price bar chosen correctly represents the prices of all transactions that took place during the time while that bar was plotted. Or does the bar plot something else?
Let us take a standard renko bars. Renko bars plot false opening prices, false highs and false lows. What does that mean? On a renko chart you cannot find the daily high and the daily low. You will never know, because the renko bars do not show it. As the bar open of a Renko bar is a fake open, you may never run a backtest on a renko chart, if you enter or exit with market orders.
Heikin Ashi bars have a displaced open and a fake close. Most of the lows of all upclose bars and most of the highs of the downclose bars are also fake, as real low and high are replaced with the heikin ashi open. What do you expect from a backtest, if you enter fake data?
Don't even think about backtesting renko bars, heikin ashi bars, range no gap bars or three line break bars. They do not represent price action. They are just designed for making you happy, but not for making you money.
Some of those bar types can be modified to become backtestable. Attached is a chart comparing a standard renko bar with a backtestable renko bar.
If you wish to run a backtest, you would need to select a bar type that is backtestable. Bar types that show the real open, high, low and close are typically backtestable.
Bar types that print a fake open, fake high, fake low or a fake close are not backtestable.