I´m going back to your reference sample from here:
I can´t agree with this part of the code which is saying:
/* FirstTickOfBar specifies that this section of code will only run once per bar, at the close of the bar as indicated by the open of the next bar. NinjaTrader decides a bar is closed when the first tick of the new bar comes in, therefore making the close of one bar and the open of the next bar virtually the same event. */
For me the close and open are the time driven events and not tick driven. So I can´t never make the open with my own first tick!
Is there some other time logic which can be implemented?? I mean to have part of the stop code in tick by tick and the entry to position on bar update specified with some timer in seconds??
Thx.
Best regards,
vb
Comment