we developed strategy in BackTesting and we noted that index is 0 for current bar, for previus bars is >0 and for next bars is<0. In Market replay we noted that index 0 is null position, to get first bar index is -1 and to get current bar index is -Bars.Count. Is it correct or I am wrong?
My problem is max and min functions, in back testing MAX(High,9)[0] work fine but in Market Replay no, what can I do? We are c# developers and we integrated excel from Ninja script, is there a possibility to manage a form from your script? Our problems are:
1) Initialize function is called one or more times evenif strategy is not used
2) There isn't event to know if the strategy is closed/unload/dispose, so we can't unload all our variables (for example a timer)
Very Thanks for you support
Comment