Assume the following:
-- multi-instrument, multi-timeframe strat
-- default [0] Bar is 1 minute bar
I want to calc the high of a one second bar.
Easy,
Add(PeriodType.Second, 1); // Add a 1 sec Bars object - BarsInProgres index = 1
double oneSecHigh = Highs[1][0];
So I am adding a 300 second ( = 5 min) bar, and having it update every second. This is Bar Index 2.
The code appears as follows:
Add(PeriodType.Second, 300); // Add a 300 sec Bars object - BarsInProgres index = 2
If (BarsInProgress == 1) {double fiveMinHigh = Highs[2][0];}
Help straighten me out
Regards,
Andrew
Comment