Ok so to sum up, either I can get the prices right, or the timetamps, but not both.
I think this bug went through the tests because the prices are right, but the timestamps aren't, which is trickier, because in a 'normal' custom symbol, it's only ONE tick difference, which would not show on the backtest report timestamps, but in my case this unique tick, means a completely different timestamp (in my custom symbol setup, the next tick after the buy order is the next "new bar" or next buy/sell signal):
this is the Custom Symbol backtest :
2017.04.10 01:00:00 2 BTCUSD_Ask buy in 0.01 1208.58 2 0.00 0.00 0.00 100 000.00 2017.04.10 05:42:24 3 BTCUSD_Ask sell out 0.01 1203.83 3 0.00 0.00 -4.75 99 995.25
and this is the original backtest
2017.04.10 00:01:02 2 BTCUSD buy in 0.01 1208.58 2 0.00 0.00 0.00 100 000.00 2017.04.10 05:20:02 3 BTCUSD sell out 0.01 1203.83 3 0.00 0.00 -4.75 99 995.25
as you can see the profit & prices are right, but the time stamp of the Custom Symbol is wrong, it uses the timestamp of the NEXT tick instead of the actual timestamp
i've tried to take that into account but it simply is not possible
please look into it.
thanks so much
Jeff
EDIT : I found a workaround, I just double the ticks:
seems to work so far
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Ok so I made an EA that uses custom symbols to improve backtesting speed : I store only the necessary ticks of the open and close signals in the custom symbol thus it backtests really fast
only problem here : there is a difference in the behaviour of the backtester, whether the symbol I request from is the main symbol selected in the Strategy tester or not.
I got two identical symbols, both have the same tick data(just a test) :
when I want to request the ask and bid values at a certain time of a symbol different from the main symbol, I have to substract 100 ms on the timestamp to get accurate trading results (identical trading times & profits).
If I don't do that, I get wrong timestamps and prices, when the code is exactly the same (I just switch main symbol name).
I think there is something wrong.
I'm on it for quite some time and i'm quite sure of my code, but maybe i'm doing something bad, the thing is the code is the same, only the main symbol changes, and everything becomes wrong when I try to access a different symbol than the main selected one.
I access both symbols on the same tick obviously, but in one case timestamp and price are different
thanks so much for help moderators.
Jeff