|
What you need to do is to have a "static" variable which is something like
"bool ITradedOnThisBar;"
Which is cleared to 'false' every time you have a new bar, and set
to "true" whenever each new trade is signaled.
You check for a new bar by saving the Bar time, e.g. Time[0];
into a variable (check for the right data type) also static or
declared globally.
Then when you enter start(), which happens on each new tick,
you then check the present Time[0] and compare---if unequal
there is a new bar. You can set a boolean variable for that too.
I
|