You're absolutely right. It counts bars. So use the value of Bar() to loop over bars in the past and count each time an event occurs.

Unless there is a special function for such a thing that's how I would do it.

Cheers,
BobbyT

EDIT: C, like many languages is case sensitive. Bar() != bar()

Last edited by BobbyT; 07/15/17 03:41.