![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi Mladen,
I would like to optimize this EA but the variables got no name, are you able to assign these from the code. I tried but Im not so familar with fomula and definitions in the code.
Hi Mladen, I would like to optimize this EA but the variables got no name, are you able to assign these from the code. I tried but Im not so familar with fomula and definitions in the code.
That is a decompiled code, that is why it is like that
Sorry, but without the original code I doubt that anybody can reconstruct original parameters names
chrisstoff
Use this one. Made it new metatrader compatible and corrected some logical errors (in cases when multiple orders existed)
PS: it is made for new metatrader 4. It will not work with build 509 or earlierMladen,
Sorry, not all the functions work any more. I just tried 'Close all pending orders' and 'Close orders in profit' and they did nothing.
Some excerpt from the Expert log:
0 12:25:58.411 CloseAll nmc USDCAD,Daily: initialized
0 12:25:58.411 CloseAll nmc USDCAD,Daily: uninit reason 0
0 12:25:58.411 Script CloseAll nmc USDCAD,Daily: removed
0 12:26:06.417 Script CloseAll nmc USDCAD,Daily: loaded successfully
0 12:26:18.768 CloseAll nmc USDCAD,Daily inputs: option=5; magic_number=0; comment_text=;
0 12:26:18.771 CloseAll nmc USDCAD,Daily: initialized
0 12:26:18.771 CloseAll nmc USDCAD,Daily: uninit reason 0
0 12:26:18.771 Script CloseAll nmc USDCAD,Daily: removed
0 12:27:36.165 Script CloseAll nmc EURUSD,H1: loaded successfully
0 12:27:45.056 CloseAll nmc EURUSD,H1 inputs: option=2; magic_number=0; comment_text=;
I tried it with Build 830 and 840.
Could you please modify this to work with the current Builds?
(The CloseAll nmc is attached to the quoted post.)
Mladen,
Sorry, not all the functions work any more. I just tried 'Close all pending orders' and 'Close orders in profit' and they did nothing.
Some excerpt from the Expert log:
0 12:25:58.411 CloseAll nmc USDCAD,Daily: initialized
0 12:25:58.411 CloseAll nmc USDCAD,Daily: uninit reason 0
0 12:25:58.411 Script CloseAll nmc USDCAD,Daily: removed
0 12:26:06.417 Script CloseAll nmc USDCAD,Daily: loaded successfully
0 12:26:18.768 CloseAll nmc USDCAD,Daily inputs: option=5; magic_number=0; comment_text=;
0 12:26:18.771 CloseAll nmc USDCAD,Daily: initialized
0 12:26:18.771 CloseAll nmc USDCAD,Daily: uninit reason 0
0 12:26:18.771 Script CloseAll nmc USDCAD,Daily: removed
0 12:27:36.165 Script CloseAll nmc EURUSD,H1: loaded successfully
0 12:27:45.056 CloseAll nmc EURUSD,H1 inputs: option=2; magic_number=0; comment_text=;
I tried it with Build 830 and 840.
Could you please modify this to work with the current Builds?
(The CloseAll nmc is attached to the quoted post.)chrisstoff
All is OK with that script
This is what it did on my build 842 :
_____________________
PS: in a new mt4, script is started, the start procedure is called once, and then the script is automatically removed from the memory (it does not work as in the old build when it was active in the memory till you removed it)
chrisstoff
All is OK with that script
This is what it did on my build 842 :
_____________________
PS: in a new mt4, script is started, the start procedure is called once, and then the script is automatically removed from the memory (it does not work as in the old build when it was active in the memory till you removed it)Unfortunately I still have problem with it. The CloseAll function is working OK, but e.g. the 'Close orders in profit' is not. I tried it on USDCAD, there is a position in profit and I tried to close just that one, but nothing happened.
Unfortunately I still have problem with it. The CloseAll function is working OK, but e.g. the 'Close orders in profit' is not. I tried it on USDCAD, there is a position in profit and I tried to close just that one:
but nothing happened:
Was not closed_Snap 2015-06-29 at 13.25.17
The same event in the Experts log with the settings:
ExpertsLog w Settings_Snap 2015-06-29 at 13.38.50Found an error in that version - it was closing order only if there was just one order opened. Try out this one : closeall_nmc.mq4
Found an error in that version - it was closing order only if there was just one order opened. Try out this one : closeall_nmc.mq4
Thank you![](https://c.mql5.com/forextsd/smiles/smile.png)
I will test it as soon as I can.
Edit:
Yes, it works well now, I mean it closed the order that was in profit and the other orders remained intact. It also closed the pending orders separately.
Thank you for your help!![](https://c.mql5.com/forextsd/smiles/smile.png)
I am looking for a pending orders opening script which is able to open a series of orders at/from a user definable price level with also definable distance between the orders and can open any kind of pending orders.
Any help would be appreciated.
I found this one but it opens only one order at a time and also gets several benign warnings at compiling.
I am looking for a pending orders opening script which is able to open a series of orders at/from a user definable price level with also definable distance between the orders and can open any kind of pending orders.
Any help would be appreciated.
I found this one but it opens only one order at a time and also gets several benign warnings at compiling.chrisstoff
Did you check this one (for example) : https://www.mql5.com/en/forum/178858
chrisstoff Did you check this one (for example) : https://www.mql5.com/en/forum/178858
Mladen,
No, I have not checked it yet, but will do.
Thank you for drawing my attention to that thread.