i don't think you can do this in an EA.
MQL code can only get access to the settings of the terminal but can't change them.
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
I've gone through lots of threads about this and also the MQL4 documentation but couldn't find the answer...
I've seen options of toggling the main Allow Trading button, removing the EA through a script or closing trades if Magic Nr or comment of an EA is known.
But what would perfectly fit my needs atm is accessing the "Allow Trading" button in the Parameters window (when EA is started or modified).
Long story short - disable trading of an EA per chart.
I wonder if someone smarter than me already came up with a method for this.
Let me please know !
Cheers!