That just loops through the orders you have open already.
The OrderSend function sends one order. If you want to send more than one order you will have to call it more than once. You can use a for loop to do that as well if you would like.
int howMany=10;
for(;howMany>0;howMany--) { // put whatever you want to happen 10 times in here. }
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Your previous code that starts with
for (int i=OrdersTotal()-1;i>-1;i--){
That just loops through the orders you have open already.
The OrderSend function sends one order. If you want to send more than one order you will have to call it more than once. You can use a for loop to do that as well if you would like.
int howMany=10;
for(;howMany>0;howMany--)
{
// put whatever you want to happen 10 times in here.
}
for(int res=OrderSend(_Symbol,cmd,lot,pr,slip,SL,TP,comment,BN-1);res>-1;res--)
i use this syntax it go to infinity means did not stop just a repeater. what logical error in this code
for(int res=OrderSend(_Symbol,cmd,lot,pr,slip,SL,TP,comment,BN-1);res>-1;res--)
i use this syntax it go to infinity means did not stop just a repeater. what logical error in this code