close all orders

To add comments, please log in or register
Sumit Roy
45
Sumit Roy  

Please help me with closing all buy and sell orders simultaneously with single click in mql5.

Thanks 

Ahmet Metin Yilmaz
5373
Ahmet Metin Yilmaz  
Sumit Roy :

Please help me with closing all buy and sell orders simultaneously with single click in mql5.

Thanks 

I apologize for asking this, but what is your job?

Alain Verleyen
40433
Alain Verleyen  
Ahmet Metin Yilmaz:

I apologize for asking this, but what is your job?

What's that question ?
Ahmet Metin Yilmaz
5373
Ahmet Metin Yilmaz  
Alain Verleyen :
What's that question ?

It was to ensure empathy.

Sumit Roy
45
Sumit Roy  
Ahmet Metin Yilmaz:

I apologize for asking this, but what is your job?

Sorry for late Reply.... Actually i am trying to build a trading strategy in which i want to close all position simultaneously when certain conditions are met.

Thanks

Ahmet Metin Yilmaz
5373
Ahmet Metin Yilmaz  
Sumit Roy:

Sorry for late Reply.... Actually i am trying to build a trading strategy in which i want to close all position simultaneously when certain conditions are met.

Thanks

And , did you do smth for this? Or did you try ?

If yes share your work here 

someone can show you right way to do .

Sumit Roy
45
Sumit Roy  
Ahmet Metin Yilmaz:

And , did you do smth for this? Or did you try ?

If yes share your work here 

someone can show you right way to do .

i don't know how to attach the code here. can you help me?

Hasan
301
Hasan  
//if condition true ???
for(int i = OrdersTotal()-1; i >= 0 ; i--)
{
   OrderSelect(i, SELECT_BY_POS);
   int CloseO = OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),3);  
}
bind that code to chart event if you want to use button clicks
Ahmet Metin Yilmaz
5373
Ahmet Metin Yilmaz  
Sumit Roy:

i don't know how to attach the code here. can you help me?

You can paste your code with pressing Alt+S here.

To add comments, please log in or register