If i run it strategy and it takes positions, often when i refresh it, the positions change.
I think this is because of micro timing differences in the bar close of primary series vs the secondary series which impacts the assessment of indicators, rules or, any entry criteria, which is supposed to be based on the closing price of both data series instantly. This is the result we see in the back tests.. but in live trading it goes out of wack.
Example if strategy runs OnBarUpdate, on 60min timeframe and BarsInProgress == 0, there is no guarantee that Ratio = Closes[0][0] / Closes[1][0] is based on the latest hourly candle that closed at 2pm. in fact it seems to often take 2pm value for primary series and 1pm value for secondary, and trade. then if you refresh the strat at say 2:01PM the net strategy positions suddenly looks different.
Am i correct to consider this is the reason for my issue? What is the solution for this?
Thanks
Comment