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.
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
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.
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?
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.
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.