I'm doing a calculation inside OnBarUpdate() and want the result of the last bar to export to a file.
How can I know I'm in the last bar?
For example the first bar I can check with CurrentBar == 1 but how can I know I'm in the last iteration(bar)?
Thanks in advance,
Roy

Comment