For now I use this construction:
But I need to do condition for while to repeat only after get new tick (equal mt5) ... Maybe anybody know how do it for better works?
Hello, how are you?
I am not sure if I understood it correctly, but you could try to check the last tick time. You still need to check each tick, but the heavy calculation made inside ..... any operations .... will happen only in a new tick. It may not be equal to MQL5, but it might work.
I have this solution:
time = 0 while True: tick = Tick(trade.symbol) if tick.time_msc != time: ..... any operations .... time = tick.time_mscIt checks the time of the last tick and it stores that information, if it runs the code and the time is the same, it skips the heavy calculation.
- Joaopeuko
- github.com
Hello, how are you?
I am not sure if I understood it correctly, but you could try to check the last tick time. You still need to check each tick, but the heavy calculation made inside ..... any operations .... will happen only in a new tick. It may not be equal to MQL5, but it might work.
I have this solution:
It checks the time of the last tick and it stores that information, if it runs the code and the time is the same, it skips the heavy calculation.Thanks, This is only one idea that I was think and you are get this too :) I not sure, but I think that integration API need "event" that will be work if market is change ... and current method is really one that better, because I can skip many iteration without changes.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
But I need to do condition for while to repeat only after get new tick (equal mt5) ... Maybe anybody know how do it for better works?