I have a strategy that is supposed to calculate the value of an indicator at bar close, and if the criteria is met, submit an order after the bar close. What I'm experiencing though is that the order is being submitted at the end of the second bar, not the beginning of the second bar. E.g. imagine I have 15-min bars and the criteria was met at the close of the bar ending at 8:30am. The order should be submitted at 8:30:01 am, however it seems my orders are consistently being submitted 15 minutes later, at 8:45, which is the end of the second bar.
What settings do I need to change to avoid this delay?
On a related note: what's the difference between the "Calculate on Bar Close" settings available in the ninjascript wizard (when creating/editing a ninjascript) vs. the same setting in the new strategy window (when setting up the live strategy for a specific instrument)?
Comment