Bug? Slippage value missed by 2 pips

 
Please help me with this problem:

It looks like the slippage value I am using for a BUYSTOP trade is missed by 2 pips:
BUYSTOP is at 1.9737
SLIPPAGE is 2 pips (see #define SLIPPAGE_ON_ENTER)
EXECUTION happens at 1.9734.
, which is not Ask+2pips but Ask+4pips

I am running test in "Open Prices only" mode on GBPUSD, M1 with From. . To dates 2007. 01.01 .. 2007.02.09. Here's a screenshot to illustrate the problem (and in the zip file is expert code + fxt data + .set files with input params):


Note that if you change the g_iSlack input param from 16 to 17, effectively increasing the entry level by 1 pip the problem disappears...

A brief description of the logic of this EA: it examines previous day High/Low and enters into a trade if these levels(+g_iSlack+SLIPPAGE_ON_ENTER) are broken. For confirmation that your test is correct - with slack=16 your profit for the period should be 6996.80.

thanks
4x4ever
Files:
 
Unfortunately, it is impossible to repeat your testing, because the expert comprises calls iHigh (). It is need add hst file GBPUSD1440.hst ( #define TREND_PERIOD PERIOD_D1 )

 
In my back testing only 2 orders was opened.



Settings


 
Ok, I'll also upload my GBPUSD Daily. Hopefully this will make it reproducible. Thanks for taking a look at this.

Even though you used different daily data for your test, it is very strange that the expert only opened 2 trades for you... Are you saying that a) only 2 orders were EXECUTED or b) only two were SUBMITTED? (i.e. in your Results screenshot above those 6 entries are the only entries or there are more BUYSTOP/SELLSTOP orders below, but they did not execute because the BUYSTOP/SELLSTOP levels were never reached?)

If it is a) - would you please look in the Journal and see if the expert is actually running for the entire period or it's only running between 1st and 2nd of January? If it's b)... hmm... then I don't have any idea wtf is going on... Because even with non-matching daily data the daily levels should be more or less the same.. . Oh! Wait! Actually they won't be the same because MQ's server is in Russia (I assume?) and IBFX is in US and they will provide totally different data because of the time zone difference! I.e. - if my expert compares daily high/low values from a European time zone to current ticks coming from US that won't work very well... But still - only two trades... weird.

Anyway - I'll upload GBPUSD1440.hst tonight. Could you please let me know what you see in the Journal, regarding dates when the EA is running?

thanks
4x4ever
 
Hi Rosh, here is the hst file.

I think I know why my expert only ran 2 trades for you: you did not check the "Use date" checkbox (it's off in your screen shot) and you ran into the problem which I described here: 'strange observation about "Visual" and From/To settings in Tester', where you need to run the tester at least once in Visual mode, itherwise it does not detect the fact that you changed the dates and works only with a small sub-range of From/To the date period. Which is good (if this is the case) because now you can reproduce it on your computer and take a look :)

cheers,
4x4ever
 
hmm the hst file was not attached for some reason... trying again...
 
4x4ever:
hmm the hst file was not attached for some reason... trying again...

heh, looks like it can't attach aremote file (when the file I am attaching is on another computer on my local network). I copied the file locally, should work now. ...
 
4x4ever:
4x4ever:
hmm the hst file was not attached for some reason... trying again...

heh, looks like it can't attach aremote file (when the file I am attaching is on another computer on my local network). I copied the file locally, should work now. ...

wtf!? I attached files on this forum many times before and it always worked fine before... I'll email it to you, Rosh, ok? (horosho shto zapisal tvoie mylo na "vsiakii pojarnyi" :) )
 
I've received your file. I'll see it on next week.
 
Thank you!
 
Regarding your problem that the expert only opened 2 trades for you - please take a look at this post, I think that is the problem and that is why this is happening (only 2 trades opened in your tester): 'strange observation about "Visual" and From/To settings in Tester'.
vsego...
Reason: