pivot points - page 2

 
Mikeel1987 #: Thank you Fernando, I will see what kind of inspiration I can get from the OnCalculate () event handler.

Basically you use a variable to keep track of how many bars you have already processed, so that you don't have to check them again on the next event.

 
Fernando Carreiro #:

Basically you use a variable to keep track of how many bars you have already processed, so that you don't have to check them again on the next event.

any advice on how to do that?  

 
Mikeel1987 #:

any advice on how to do that?  

Ok I have a code written that will produce the results I want.  The question I have now is, is there a way to calculate something only once per candle on the global scope.  I don't need it to calculate every tick.  Back testing will take forever if it does it on every tick.

 
Mikeel1987 #:

Ok I have a code written that will produce the results I want.  The question I have now is, is there a way to calculate something only once per candle on the global scope.  I don't need it to calculate every tick.  Back testing will take forever if it does it on every tick.

Not in global scope
When a new tick arrives check if it is a new bar and if not stop processing until the next tick


Reason: