I have written a small EA that must close some manual transactions when the NLMA indicator changes.
But it does not want to close the transactions when it should and I cannot find out why! Is it perhaps my empty deinit?
Can you possibly help me solve what is wrong that I am totally blind for? I will appreciate it very highly!
Here is the simple code:
Also read this thread, especially the later posts, it is very relevant: https://www.mql5.com/en/forum/146570
Ydrol,
I am embarrassed! You hit the nail on the head! The MagicNumber 99999 is based on another EA that I wrote to generate the transactions. BUT I am now only using this EA to generate Alerts and then I decide to trade it manually or not.
So this code does not work, because the code cannot find the MagicNumber 99999!!!
So I will have to identify these transactions in another way, e.g. by order number.
Thank you so much. You have helped me a lot!
Ernest.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have written a small EA that must close some manual transactions when the NLMA indicator changes.
But it does not want to close the transactions when it should and I cannot find out why! Is it perhaps my empty deinit?
Can you possibly help me solve what is wrong that I am totally blind for? I will appreciate it very highly!
Here is the simple code: