Hello, I`m a newbie!
I need help. I`m looking for a possibility to"tell" to my EA, that he has to open a trade only one time. I mean, if the EA found all conditions to enter the market he has to enter and if the conditions come to exit he has to exit and now NO enter again!
Thanks
Offhand I can think of three possibilities:
1) use a script (rather than an EA) and when it is finished it will delete itself from the chart.
2) Use a stop command, where you set a boolean variable called stop and as the first lines in your EA you test
if( stop ) return( 0 );
3) use a self-destruct command in the EA to terminate it. (NOT RECOMMENDED METHOD as it is advanced programming)
Method (2) is probably what you need.
I need help. I`m looking for a possibility to"tell" to my EA, that he has to open a trade only one time.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I`m a newbie!
I need help. I`m looking for a possibility to"tell" to my EA, that he has to open a trade only one time. I mean, if the EA found all conditions to enter the market he has to enter and if the conditions come to exit he has to exit and now NO enter again!
Thanks