I'm currently backtesting my first strategy implemented on NT. My strategy adds both a daily and a tick-based time frame - and within those all relevant calculations are done.
Now, beginning with the first tick of a new trading day, I want to monitor the market development based on each day's open price.
The problem is: NT does calculations based on yesterdays open price.
Consider the following code:
protected override void Initialize() {
[...]
Add(PeriodType.Day, 1);
Add(PeriodType.Tick, 1);
[...]
}
protected override void OnBarUpdate() {
if (BarsInProgress == 1 && FirstTickOfBar) {
Print("Time: " + Times[1][0] + ", Open: " + Opens[1][0]);
}
}
Why? And how do I really get the open price of today?
Thanks for your help!

Comment