Printing out values across a certain period of bars can be done as below, using your example of starting at bar 12 and ending at bar 38:
private int startBar = 12; private int endBar = 38; protected override void OnBarUpdate() { if (CurrentBar >= startBar && CurrentBar <= endBar) Print("Bar " + CurrentBar + " High: " + High[0] + " Low: " + Low[0]); }
Leave a comment: