MQL4 - automated forex trading   /  

Forum

Different Results Backtesting/Forward Demo

Back to topics list To post a new topic, please log in or register

avatar
2
msforex 2008.11.20 09:20 

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.




  



article

Expert Advisor Sample

The principles of MQL4-programs development are shown on sample of creating a simple Expert Advisor system based on the standard MACD indicator.


avatar
2462
phy 2008.11.20 09:21 

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

no. backtest ticks are simulated.


avatar
2
msforex 2008.11.20 10:42 
phy wrote >>

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? 


avatar
4
wolf1210 2009.07.02 15:48 
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


avatar
6
lynckmeister 2009.07.05 18:06 

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?



avatar
48
rortiz77 2009.07.05 18:42 
msforex wrote >>

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

Back to topics list  

To add comments, please log in or register