Why EA's backtest and live have different result?

 

This is the backtest result, open 4 trades.

This is my live account, only 1 trade opened, and the trade should closed two bars ahead according to EA's rules, but it didn't.

Could somebody tell me why this happened? Thank you!

 

Forum on trading, automated trading systems and testing trading strategies

Same broker, different results

Sergey Golubev, 2020.07.25 09:15

  • It may be quotes,
  • it may be the time you start backtest (minutes/seconds),
  • it may be the number of ticks which is the different for every backtesting case;
  • it may be the following: using indicators as icustom which perform differently for different brokers based on the quality of quotes (example: iTrend indicator; some indicators in AscTrend system, more);
  • if your EA is martingale, scalping, or martingale scalping, or using Money Managementy so it may backtest differently every time you are backtesting.
  • and more ..
...

---------------------------

It is necessary to know the strategy (manual trading system) and agree with this strategy  (and it is necessary to know the seller) in case to believe in backtesting results (just my opinion).


 
  • if you backtest in MT5 with "every tick based on real ticks" mode in Metatrader 5 and having different results from real trading so it is very strange/abnormal case for MT5, and it may be related to the bug in your EA;
  • if you backtest in MT4 and having different results from real trading on MT4 so it is norma for MT4.

  • ..and read here for more: Testing trading strategies on real ticks and the explanation is on this post

    Testing trading strategies on real ticks
    Testing trading strategies on real ticks
    • www.mql5.com
    The article provides the results of testing a simple trading strategy in three modes: "1 minute OHLC", "Every tick" and "Every tick based on real ticks" using actual historical data.
     
    I think you should backtesting with at least 90% modelling quality.
     
    You Wu:

    This is the backtest result, open 4 trades.

    This is my live account, only 1 trade opened, and the trade should closed two bars ahead according to EA's rules, but it didn't.

    Could somebody tell me why this happened? Thank you!

    There are so many factors that come into play. Slippage, spread, method of backtesting, quality of your historical data, etc...

    If the data you are backtesting comes from a credible source (for example Tick Data Suite using Duka) and you are using a variable spread, chances are backtests and live testing should be somehow similar.

    How are you backtesting? Using 'Every Tick' in MT4? or Candle Close for example?


    My advice is to play around with your backtesting and make sure your Live broker has low spread and slippage. These are quick fixes before diving deeper into the EA operations..

     
    Hussein Saade:

    There are so many factors that come into play. Slippage, spread, method of backtesting, quality of your historical data, etc...

    If the data you are backtesting comes from a credible source (for example Tick Data Suite using Duka) and you are using a variable spread, chances are backtests and live testing should be somehow similar.

    How are you backtesting? Using 'Every Tick' in MT4? or Candle Close for example?


    My advice is to play around with your backtesting and make sure your Live broker has low spread and slippage. These are quick fixes before diving deeper into the EA operations..

    Thanks for your advice! I backtested with MT4 using every tick, the quality is 90%, i think the problem is slippage and spread.

    I want EA to close trade follow the rules even spread or slippage is very big at that time. For example it should close the trade at lower band two bars ahead in the second picture, but it didn't. Then it's totally different from the rules.


    Now i changed the EA's ordersend maxsilppage and spread to a very big value. I hope now the live trade resut will be more similar to backtest. Don't know if it's going to work or is there anyway to make it better…

    Reason: