Kaschalot98: Traders, is it possible to change the OnTick function to a while(1) loop for example ?
OnTick() is an event handle and it is not a good idea to block the vent with an infinite loop. That would cause all other events to build up and not be processed.
Instead handle the event an return as soon as possible. Save your state (a state machine), so that you can continue on the next tick event to be handled.
Kaschalot98: I programmed a bot that in Metaquotes servers, but it doesn't work like that my Real broker. Things that not be causing the problem — the Latency is lower than on the computer that the algo was tested in
That is difficult to say. It can depend on many factors. The most probable cause is that your EA is not reading the contract specifications and adapting to those conditions.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Traders, is it possible to change the OnTick function to a while(1) loop for example ?
Bonus Question:
Edited by moderator to correct capitalisation, improve readability and remove unnecessary references that could violate forum rules.