I did some troubleshooting and found that Ninja does follow the first time rule, but not the second. I confirmed this by running a strategy from 2am to 8am in a template that went from 6am to 8am - all trades happened within 6 to 8. However on the default templates, it goes from 2am to the close.
I went back to my strategy, and checked that the code was correct and that I compiled it... I have this:
&& ToTime(Time[0]) <= ToTime(8, 0, 0)
The first rule will be followed, but not the second (apparently). I'm wondering hwat I'm screing up...
Also, I've found that both ToTime(6,0,0) and 60000 produce the same results (follows the first >= rule, not the second <= rule).
Comment