Ordercloseby

 
Hi
Can anyone explain the code ordercloseby to me
When I use it to close buy and dell orders it gives me error 3
Thanks 
 

Hi

This is mt4 question. Simply you use one opened position to close an opposite opened position, but you must have both tickets known and the lots must be equal. So, it’s a bit tricky to use.

The idea is to close it directly by themselves, but you can simply close them separately one by one – close one and close the other one by OrderClose function.

Best Regards

 
Marzena Maria Szmit #:

Hi

This is mt4 question. Simply you use one opened position to close an opposite opened position, but you must have both tickets known and the lots must be equal. So, it’s a bit tricky to use.

The idea is to close it directly by themselves, but you can simply close them separately one by one – close one and close the other one by OrderClose function.

Best Regards

thanks 

 
In General ist a seniles Funktion, you dont save spread bcs you pay it in price
Reason: