Testing with Third-Party Data Offline

Back to topics list To post a new topic, please log in or register
avatar
13
NoLimitations 2015.07.02 23:53
 

Hello all,

Hopefully someone more intelligent at coding/MT4 than I can help me.

I'm backtesting offline on MT4 with my own data. My broker's usual MINLOT and LOTSTEP = 0.01.

 

When offline,

Print(MarketInfo(Symbol(),MODE_MINLOT));

and

Print(MarketInfo(Symbol(),MODE_LOTSTEP));

both return 0.1.

This is resulting in an "OrderSend error 131" due to my position sizing being in the format of xx.xx00000000xx after normalizing the value.

What can I do to solve this?

Thanks and have a great day. 

avatar
484
ydrol 2015.07.03 00:17 #
 
Are you testing with tick data? How & when are you creating the tick file? Various account settings are embedded in the header of the fxt file.  including minlot, lotstep etc.
avatar
13
NoLimitations 2015.07.03 00:24 #
 

I'm testing with tick data converted to 1m data so it's usable by MT4.

All the tick and 1m data are csv files.

avatar
484
ydrol 2015.07.03 00:33 #
 
you may need to go online briefly, run a test then go offline again ? 
avatar
13
NoLimitations 2015.07.03 00:44 #
 

I believe going online will cause the history center to be filled with server data, which I don't want. Possible there's a way around that.

Does anyone know if there is a way to manually change MODE_MINLOT and MODE_LOTSTEP when not connected to any servers? 

avatar
484
ydrol 2015.07.03 01:20 #
 

I'm guessing: 

  • copy your ./history/BROKERSERVER/*.hst files somewhere safe. 
  • go online
  • run short backtest
  • go offline
  • copy back hst files. - also for good measure make them read only 

I suspect the info is in ./config/BROKERSERVER.srv if you can find the format, you can patch it


avatar
13
NoLimitations 2015.07.03 03:32 #
 
I don't see either of those files anywhere, I'm just going to alter my position sizes to a less accurate value for now.
Back to topics list  

To add comments, please log in or register