henry.omd
11-14-2007, 07:27 PM
Firstly, I have read the "multi-timeframe and instruments" section of the manual and understand the behavior described. Even though I understand the behavior as documented, I don't understand why you took the trouble to make the real-time behavior and historical data behavior different when CalculateOnBarClose = true. The real-time behavior of course makes sense; if my primary bar is 30 minutes and the secondary bar is 1 day, I of course do not know the HLC until the end of the day, when the HLC of the last 30 minute bar is also decided. It's quite baffling then why NT developers chose not to preserve the same behavior when testing with historical data; it would seem that they had to do MORE work to introduce this discrepancy.
RFE: Please make the historical bar behavior be the same in both RT and historical case.
Now for the bug: please see the attached picture, where I draw a black horizontal line at the High[0] and Low[0] of the daily bars using
DrawLine(CurrentBar.ToString() + "High", 0, High[0], 13, High[0], Color.Black)
for example. Do you notice that the High[0] and Low[0] are actually drawn on the *previous* day, starting at the closing 30 minutes of the *previous* day? It would seem that when testing with historical data, the day bar is decided at the close of previous day when 30 minute bar is the primary bar. Aside from violating causality (causing my strategy to be fantastically successful against historical data), this behavior is different than your documentation.
Can you please point out my misunderstanding?
-Henry
RFE: Please make the historical bar behavior be the same in both RT and historical case.
Now for the bug: please see the attached picture, where I draw a black horizontal line at the High[0] and Low[0] of the daily bars using
DrawLine(CurrentBar.ToString() + "High", 0, High[0], 13, High[0], Color.Black)
for example. Do you notice that the High[0] and Low[0] are actually drawn on the *previous* day, starting at the closing 30 minutes of the *previous* day? It would seem that when testing with historical data, the day bar is decided at the close of previous day when 30 minute bar is the primary bar. Aside from violating causality (causing my strategy to be fantastically successful against historical data), this behavior is different than your documentation.
Can you please point out my misunderstanding?
-Henry