I was wondering if anyone was familiar with a way to backtest the actual market data as opposed to what TS2 shows on the chart. As you may already know the system is hiding price gaps so when you run a backtest and the strategy opens a position based on the last closed candle it may not actually be how it would play on out on the market.
This is more geared to the higher time frames specifically around the open of the market.
Also on the same note am trying to figure out how to make the strategy/strategies I currently use to open/start at the beginning of each new H8 or D1 candle based on the current market condition.
Currently I have to manually start and Pause the live candle setup of strategy which calls on this code.
- Code: Select all
if OrderTime == "immidiately" then
source = ExtSubscribe(1, nil, "t1", instance.parameters.Type == "Bid", "tick");
else
source = ExtSubscribe(1, nil, instance.parameters.TF, instance.parameters.Type == "Bid", "bar");
end
After position is open I pause it so it does not jump back in if position is closed. Am testing various scenarios to see what works but wanted to see if anyone had any ideas. Backtesting these changes doesn't help because system always backtests and opens on new candle because of what I mentioned above.
However when put on live or demo account you get error message:: "Open order failedThe command is disabled."
ps: I do not have a FIFO account.
Here is one of the changes I've made waiting till next open to see if orders are triggered.
- Code: Select all
if OrderTime == "immidiately" then
source = ExtSubscribe(1, nil, "t1", instance.parameters.Type == "Bid", "tick");
else
source = ExtSubscribe(2, nil, instance.parameters.TF, instance.parameters.Type == "Bid", "open");
end
Here is an Example of the gap data issue on the backtesting system. I've already turned off the hide gap data feature on marketscope however it does not transfer over to the backtesting system.
I've reached out to FXCM and they've advised that the gap feautre is only there for Aesthetics but as you can see on the image below the backtest is clearly reacting to non-existent price points. They advised they will notify developers to correct issue.
https://drive.google.com/open?id=0B4RA1yOBtVPYVVFIT0w0S0N1VTA
Best
Ron