I came across this for the first time recently using the MT4 Strategy Tester
USDJPY, 1M, no optimization, "Every Tick" model
Here is the source data that I used to populate the History Centre
And here is the data I logged during the test run (Bid, Ask)
Looks reasonable to me, basically just the open prices with a fixed 3 pip spread. I had the following order open pending prior to the start of this period: PENDING_BUY_STOP, Stop @ 82.69, Take Profit @ 82.77
In 'real' life, this order would have been opened and closed during the bar at (2012-04-04T03:11:01).
However in the simulation, it was opened during the bar at (2012-04-04T03:11:01) and closed during the bar at (2012-04-04T03:12:01). In other words, the closing of this order appears to be a minute later than it should have been.
Here are the corresponding lines from the "results" tab in the Strategy Tester.
1033 2012.04.04 03:12 buy 403 1.00 82.69 0.00 82.77 0.00 73006.371034 2012.04.04 03:13 t/p 403 1.00 82.77 0.00 82.77 96.65 73103.02
I understand that we're not modelling tick by tick here, but still, given the M1 data the logical outcome is unambiguous and yet the simulation does not give the same result. Can anyone offer an explanation for this pls?
Where did your data come from ? your volume figures are wrong . . . how do you get 0.86 of a tick ? I don't think that is the cause of your issue but it raises a question mark over your data . . .
Your data doesn't tie up with what you have written, it seems the order was opened at 03:12 not 03:11 and closed at 03:13 not 03:12 If you are testing this on any other timeframe than M1 then you also need to have the other timeframes derived from the same data otherwise strange things happen.
I'm reading the data used in the simulation as follows
Time Open Close
03:11:01 82.59 82.78
03:12:01 82.78 82.77
03:13:01 82.77 82.73
The ASK is +3 pips. I've filled in the Close price as I'm assuming that it is taken to be the same as the Open of the next time instant during Simulation, even though the 'raw' data may have a different value.
Is that reasonable?
1033 2012.04.04 03:12 buy 403 1.00 82.69 0.00 82.77 0.00 73006.37
1034 2012.04.04 03:13 t/p 403 1.00 82.77 0.00 82.77 96.65 73103.02
With regards to the first row here, the time from the first row (2012.04.04 03:12), does this mean "during the minute starting at time 2012.04.04 03:12", ie during the bar (03:12:01 82.78 -> 82.77),
or does it mean "during the minute ending at time 2012.04.04 03:12", ie during the bar (03:11:01 82.59 -> 82.78)? I think that's where my confusion came from.
In either case it seems an order (PENDING_BUY_STOP, Stop @ 82.69, Take Profit @ 82.77) should be opened and closed at the same time (not sure how to refer to this - either at the same time instant, or
within the same time period maybe depending on that the times represent). Am I missing something?
The data came from dukascopy some time ago. I'm not clear on what the volume represents to be honest. It's not something I use at present. Does the strategy tester use the volume at all?
At the moment I only use M1 for back testing, derived from a single datafile that I obtained.
cms550790: Many thanks for the response. Apologies, yes, I got mixed up somewhat. In fact, I'm questioning my understanding of time date and times noted now. Let me just confirm something first.
Hi - yep, in fact I did use CSV2FXT to generate that data, however looking back at the datafile I'd used M1 data from dukascopy, not sure if I that was the correct thing to do.
Anyway, I went back to square one, downloaded tick data from dukascopy again QS Tick Data Downloader.
Then i re-ran CSV2FXT which appeared to be successful, HST and FST files generated in history\FXSolutionsUK-Demo Server and \tester\history respectively.
Running the strategy tester initially gave me "22:09:39 TestGenerator: internal error because the file not opened" - seems to be a because the file is readonly from what i've read and tried.
Making it writable then gives me the following:
22:06:29 TestGenerator: invalid file for 'USDJPY1'22:06:29 jfx: no data for testing
Deleting the FXT file and re-running gives me that same error.
Its trying to write that file, here are the file sizes before (ie as written by CSV2FXT), and after running (with the error).
USDJPY1_0.fxt.backup 35,928KBUSDJPY1_0.fxt 3,880KB
I'm running on Win7 and I know there can be permission type problems if installed in Program Files - so I've also removed from there and am running from a different drive now. I've also set the ownership of the files to me. Given its writing something I don't think this is related to permission, seems to be related to data.
Actually, switching to M5 gives me lots of unmatched data error type error messages but then it does run, so its not permission related.
It seems it still maybe something to do with the data quality. Here are the first and last 5 lines from the 6 month datafile generated by QS Tick Data Downloader.
2012.01.02 00:00:01.370,77.031,77.041,1.88,1.132012.01.02 00:00:01.874,77.031,77.041,1.88,1.132012.01.02 00:00:05.182,77.033,77.041,1.13,1.132012.01.02 00:00:48.046,77.038,77.046,1.50,1.132012.01.02 00:00:48.116,77.056,77.076,1.50,2.59
2012.06.01 20:59:53.981,77.991,78.018,0.75,0.752012.06.01 20:59:55.150,77.991,78.019,0.75,0.752012.06.01 20:59:55.216,77.988,78.019,1.50,0.752012.06.01 20:59:59.742,77.986,78.019,0.75,0.752012.06.01 21:00:00.134,77.987,78.043,0.75,0.75
I'm a little stumped. I have an 32-bit XP machine I can try to see if I get different results, otherwise I'm not sure what else to try. Do you have any suggestions?
You can't use the fxt file unless you buy 3rd party software . . . you can however use the M1 to MN1 data and let the ST create it's own fxt file from the M1 data
You need to make sure that your Broker doesn't overwrite your Dukascopy data or you will get unmatched data errors . . . you should get none with the Dukascopy data itself as everything, M1 to MN1 is derived from exactly the same source . . the tick data.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.