Perhaps you have a forever loop. This could happen if pending never gets set to false. And that could happen if your if(){Commands} fail or the status of the order is not OP_SELL.
Cocoon:
The purpose of this piece of code is to wait for
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi all, i need some help with the strategy tester functionality.
I'm making an EA (thanks to the mql4 community!) and i'm testing it with the strategy tester in visual mode, everything goes fine until the EA enter in a cycle like a while or for(;;). The strategy tester suddenly stops
For example:
The purpose of this piece of code is to wait for the order to be trigged then exit the cycle, but the only thing it does is to keep writing "cycle" (the EA is executed properly) because the price stop at the exact point where the EA enter the cycle.
What i'm doing wrong?
Thanks for your help!