Different Results Backtesting/Forward Demo

 

Hi all,


I am new to MQL4 so any hint/help on this is highly appreciated.


I wrote an EA which is making some profit when running backtest (PF>4). So a week ago I started forward testing on a demo account and although the results are not as good as with backtesting the EA is still making some money. Today I thought about backtesting the EA using last weeks data to see where to further optimize. Strangely I found out that on the same computer where the demo forward testing run the last week I now got quite different results with backtesting: almost twice as many trades were opened in backtesting (and at different times) and the EA made an overall loss for this period! I checked the parameters and settings for backtesting and they are the same as on the forward chart. Aren't the tick data (the computer was online 24h) stored on the local MetaTrader installation? So one would assume that backtesting/forwarding result on this computer should be "identical"?


I checked on a different computer importing manually historical data and recalculating all timeframes. The results there are more close to the one from forward demo, but still significantly different. 


My EA is running on a 1H timeframe for calculating open/close signals and using a 5M timeframe for placing the orders. It calculates only completed bars [1]. For testing I use every tick on a 1h timeframe.

 

Aren't the tick data (the computer was online 24h) stored on the local MetaTrader installation?

no. backtest ticks are simulated.

 
phy:

no. backtest ticks are simulated.

So how are the MT4 standard indicators on e.g. a 1h timeframe are calculated then? Based on every tick or based on the completed bars of this timeframe only? 

 
phy wrote >>

no. backtest ticks are simulated.

Hi Phy, I would like to know if there is a possibility to make a backtest candle by candle going from a point somewher back to the actual time??

Thanks for you reply, or write me wolfgschiller@web.de

 

hi msforex,


i have exactly the same problem now... did you find any solution to test your ea with the same data as they are arriving in realtime?

 
msforex:

So how are the MT4 standard indicators on e.g. a 1h timeframe are calculated then? Based on every tick or based on the completed bars of this timeframe only?

Yeah...I don't think they will always be 100% accurate. In my back test I get a different value for the ADX (5). Look below....



Using Live data


Using Back Test Data

Reason: