Hi guys, how can I code that my EA should enable "ALLOW LIVE TRADING BUTTON"? Thank you in advance.
- Allow live trading
- extern type variables discoveries
- How can I code my profile?
macpee:
Hi guys, how can I code that my EA should enable "ALLOW LIVE TRADING BUTTON"? Thank you in advance.
Hi guys, how can I code that my EA should enable "ALLOW LIVE TRADING BUTTON"? Thank you in advance.
i believe you can't.
but you can add this code it Oninit to disable the EA if the button is not pressed.
int OnInit() { if (!IsTradeAllowed()) { Alert("Please Enable Auto Trading to run the EA"); return INIT_FAILED; } return(INIT_SUCCEEDED); }
Mohamad Zulhairi Baba:
i believe you can't.
Correct, there is no way to do it without using dll calls.
Florian Riedrich:
Thank you for the reply. But I am not asking to tell whether it has been enabled/disabled. I am asking for a command that would enable/disable it.
It is possible.
I've found this in another forum
honest_knave:
A much more honest reply
Correct, there is no way to do it without using dll calls.
macpee:
Thank you for the reply. But I am not asking to tell whether it has been enabled/disabled. I am asking for a command that would enable/disable it.
Thank you for the reply. But I am not asking to tell whether it has been enabled/disabled. I am asking for a command that would enable/disable it.
https://www.mql5.com/en/code/29022
Disable auto trading but ONLY for a specific EA
- www.mql5.com
Simple Script to disable the Autotrading for the EA on the chart. If you just want to use the DLL, check the code and comment/uncomment the necessary
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