EA works on real but fail on backtest?

 

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!!

 
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!!

Articles

Raw Code Optimization and Tweaking for Improving Back-Test Results

Hlomohang John Borotho, 2025.05.09 11:55

Enhance your MQL5 code by optimizing logic, refining calculations, and reducing execution time to improve back-test accuracy. Fine-tune parameters, optimize loops, and eliminate inefficiencies for better performance.

 
Ryan L Johnson #:

the goal is not to optimize the code for backtesting, I know the code may make backtest unreliable

What I mean is, the same code that fail to show good results in backtest*which is just one thing to consider when trading a system live) this code do well on live trading

if the code do not show good results in backtest and raw code without optimization, the same code should break also on real trading

this is the point 

 
Samy.H #:

the goal is not to optimize the code for backtesting, I know the code may make backtest unreliable

What I mean is, the same code that fail to show good results in backtest*which is just one thing to consider when trading a system live) this code do well on live trading

if the code do not show good results in backtest and raw code without optimization, the same code should break also on real trading

this is the point 

The point of the Article to which I linked in Post #1 is: "By combining structural code refinement, performance-aware functions, and indicator optimization, we can drastically improve both the quality and speed of back-testing—bringing us closer to a consistently profitable and deployable strategy." If you don't want to backtest accurately, then simply don't read the Article... nor this Blog: Not All 99% Backtests Are Equal: How Tick Data Quality Impacts Your Strategy in MetaTrader 5 - Analytics & Forecasts - 15 July 2025 - Traders' Blogs.

In other words, your code and your settings may make backtest unreliable.

 
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!!

I have never experienced this because usually it's the other way round, good backtest but bad live/forward testing.