OrderClose function does not function as expected.... - page 2

 
Ok, cryptos work, besides, i would rather have some working code, that closes all active orders, since all advices end up with failure, you know. 
 
Bahman Asgarov #:
Ok, cryptos work, besides, i would rather have some working code, that closes all active orders, since all advices end up with failure, you know. 

I attached the script for you😁 Test it on a demo account.

I will not give you any guarantees; by running any programs, you do so at your own risk.

 
Vladislav Boyko #:

What do you mean by simple code?

I'm not sure, the script I attached was just written and I haven't run it even once (the market is closed). Unless I made some stupid typo (as sometimes happens), it should work.

Thanks a lot, I will try this code to see how it works in closing all orders at once.