It would be good to check the script before publishing it.
How much more concise MQL4 is...
It would be good to check the script before publishing it.
How much more concise is MQL4....
What's wrong, everything works on forex chips and, we must assume, the author had no problems with checking the script before publishing?
Forum on trading, automated trading systems and testing trading strategies.
fxsaber, 2017.02.21 10:07 AM
On symbols that support ORDER_FILLING_FOK. On others (for example, stock symbols) - will not work.
And you need ready-made, perfect, working everywhere solutions, and for free? Freelancing can help you!
I don't need any. How to write such solutions - I've posted information for free.
In particular, CloseAllPositions, which works everywhere, is provided free of charge.
scipt is not working --
scipt is not working --
Try this version.
// An EA to close all pending orders void OnTick() { //--- { int Welbeck = OrdersTotal(); for(int i = 0; i < Welbeck; i++) { ResetLastError(); //--- copy into the cache, the order by its number in the list ulong tickett = OrderGetTicket(i); if(tickett > 0) { if(mytrade.OrderDelete(tickett)) { //--- Request successfully completed Alert("An opened order has been successfully deleted !!"); } else { Alert("The order delete request could not be completed - error: ", mytrade.ResultRetcodeDescription()); } } } } }
@Nikolay Kositsin Thank you for a wonderful and very useful script. But when I call it, the window with settings pops up first, and only after clicking "Ok" positions are closed. This is very inconvenient, especially when you need to quickly close positions using a hotkey. Can you tell me how to run the script at once, without showing the settings window?
@Nikolay Kositsin Thank you for a wonderful and very useful script. But when I call it, the window with settings pops up first, and only after clicking "Ok" positions are closed. This is very inconvenient, especially when you need to quickly close positions using a hotkey. Can you tell me how to run the script at once, without showing the settings window?
Just comment out (remove)
//---- show input parameters #property script_show_inputs
(sorry for the intrusion)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
CloseAllPositions:
The script closes all open positions on the current account.
Author: Nikolay Kositsin