I have a EA. it has only a single task is buy. How to stop or limit it when OrdersTotal<=10 ?. Thanks a lots.
- How to get signal from indicator RSI for BUY or SELL by EA?
- How to set buy auto by code mql4? please show a example.
- How to stop a program?
if (orderstotal () >10) {enter here all ure orders so it will be like this:
if (orderstotal () >10) {your order here}
if (orderstotal () >10) {your order here}
if (orderstotal () >10) {your order here}
etc
please note i am still a noob and ive only been programming a week or so so u might want to get a second opinion :)
AN
The code above is incorrect
See this link https://www.mql5.com/en/forum/125841
for an example of a typical function to manage orders
-BB-
if (OrdersTotal() >= 10) { return(0); }
Place this over your OrderSend line.
(i though you meant >= (more or equal) not <= (Less or equal))
//Enotrek
Thanks a lot guys!

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