repaint, heikin ashi, profit factor - futures io
futures io



repaint, heikin ashi, profit factor


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one micasa001 with 3 posts (0 thanks)
    2. looks_two Fat Tails with 1 posts (4 thanks)
    3. looks_3 TheShrike with 1 posts (0 thanks)
    4. looks_4 JonnyBoy with 1 posts (1 thanks)
    1. trending_up 2,107 views
    2. thumb_up 5 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 2 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

repaint, heikin ashi, profit factor

(login for full post details)
  #1 (permalink)
 micasa001 
Amsterdam
 
Experience: Master
Platform: Own
Trading: Currency
 
Posts: 9 since Jul 2017
Thanks: 4 given, 1 received

Hi,

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

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Color templates for MT5 40 items
Platforms and Indicators
Does it affect the long run performance if I forcibly cl …
Emini and Emicro Index
Help with NinjaScript strategy keyboard event
NinjaTrader
Time Segmented Volume
NinjaTrader
1 min chart v-shape scan help please
ThinkOrSwim
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Al Brooks Trading Course (www.brookstradingcourse.com)
29 thanks
Fail to Plan - Plan to Fail: What can go wrong?
22 thanks
Losing faith...
21 thanks
Where do you get your financial news & investment ideas?
18 thanks
Holding futures overnight
17 thanks
 
(login for full post details)
  #2 (permalink)
 JonnyBoy 
Market Wizard
Montreal, Quebec
 
Experience: Advanced
Platform: NinjaTrader 8
Broker: Kinetick
Trading: ES
 
JonnyBoy's Avatar
 
Posts: 1,559 since Apr 2012
Thanks: 706 given, 3,757 received


micasa001 View Post
Hi,

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

Have you read this?

https://backtest-rookies.com/2018/01/26/backtrader-working-heikin-ashi/

--------------------------------------------------------
- Trade what you see. Invest in what you believe -
--------------------------------------------------------
Reply With Quote
The following user says Thank You to JonnyBoy for this post:
 
(login for full post details)
  #3 (permalink)
 micasa001 
Amsterdam
 
Experience: Master
Platform: Own
Trading: Currency
 
Posts: 9 since Jul 2017
Thanks: 4 given, 1 received




Thank you JonnyBoy, let me have a check for these codes and test it.

Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
 TheShrike 
Bridgeport, Ct
 
Experience: None
Broker: Tasty
Trading: STONKS
 
TheShrike's Avatar
 
Posts: 533 since Jun 2012
Thanks: 1,582 given, 910 received


micasa001 View Post
Hi,

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

"Artificial" bar types like heikin ashi and renko are notorious for skewing backtest results. Be very careful.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 Fat Tails 
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,858 since Mar 2010
Thanks: 4,238 given, 26,770 received

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.

Life is simple.

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #6 (permalink)
 micasa001 
Amsterdam
 
Experience: Master
Platform: Own
Trading: Currency
 
Posts: 9 since Jul 2017
Thanks: 4 given, 1 received

Thank you for the detailed explanation. Does this not make HA bars totally useless? Then why would HA bars be used when the results are distorted?

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > repaint, heikin ashi, profit factor


Last Updated on March 5, 2020


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts