Is there a way to close all open orders when the balance reaches an amount?

 
Is there a way to close all open orders when the balance reaches an amount?
 
codebase -> scripts
 

Within the start() function check AccountBalance().

Then if the result meets your criteria, run a loop implementing OrderSelect(), OrderClose() for all of OrdersTotal().


CB

 

KK

Use the approach CB suggested - find code examples for all that in this EA https://www.mql5.com/en/code/9113

Good Luck

-BB-

 
Thank You, Kalkaska
Reason: