EA works on real but fail on backtest? - page 2

 
Samy.H:

Is it possible? made my idea and backtest always give poor or negative results
But on a real account it always challenge me with every loss I say "failed on backtest and now is time to break on real" but seems challenging me to not break, and after every loss it start making winnings again until recover and go further
Am just curious how a system fail on backtest and do well on real trading!!


You may want to first ensure that the data in the tester is complete and matches the live chart data.
In our experience, MT5 is superior to MT4 in terms of backtesting.

Good luck.

 
Samy.H:

Is it possible? made my idea and backtest always give poor or negative results

But on a real account it always challenge me with every loss I say "failed on backtest and now is time to break on real" but seems challenging me to not break, and after every loss it start making winnings again until recover and go further

Am just curious how a system fail on backtest and do well on real trading!!

90% chance that it is the coding. I am quite certain that in manual trading you will be doing something that you have not done in coding -- such as only trading in certain times, trade sessions; or maybe you only trade during certain level of volatility -- that you have not made the ea to be aware of.
 
Michael Charles Schefe #:
90% chance that it is the coding. I am quite certain that in manual trading you will be doing something that you have not done in coding -- such as only trading in certain times, trade sessions; or maybe you only trade during certain level of volatility -- that you have not made the ea to be aware of.

Good point. On its face, it initially seems silly to suggest that a manual trader is unable to consciously identify everything her/his brain evaluates─for coding purposes. But how "easy" is it really? Let's set aside things like times, sessions, and volatility, and merely consider the case of OHLC prices and a moving average.

For the element of price, we see:

  • The open price of each bar,
  • The high price of each bar,
  • The low price of each bar,
  • The close price of each bar,
  • Each of those prices relative to each other N bars back,
  • Perceived swing highs,
  • Perceived swing lows, and
  • Potential perceived bias of a trend.

For the element of a moving average, we see:

  • The immediate slope of the MA,
  • The slope of the MA, N bars back,
  • Perceived swing highs of the MA,
  • Perceived swing lows of the MA,
  • Price crossovers of the MA,
  • The immediate span between price and the MA, and
  • The span between price and the MA, N bars back.
Those lists are non-exhaustive but, without going any further, we can already imagine a whole slew of trading conditions in an EA. Now consider how many "empty shell" EA's based merely on MA crossovers are floating around.
[Deleted]  
Interesting — usually people have the opposite problem. A few things to check:

First, make sure your backtest is using the same tick modeling and spread that your live environment has. "Every tick" and "Every tick based on real ticks" give very different results. If your live broker has tighter spreads than what the tester is simulating, that alone could explain it.

Second, check GMT offset. If your EA has any time-based logic, a mismatch between your broker's server time and the historical data timezone will shift your trading window and mess up everything.

Third possibility: your real account might be benefiting from favorable slippage or execution that the tester doesn't simulate. Some brokers fill at better prices than requested during low volatility — the tester always fills at the exact price.

Try running the EA on demo for a week, then backtest that exact same week with matching settings. Compare trade by trade — that'll tell you exactly where the gap is.