How to write a program code for a EA, to uncheck an ' Allow Live Trading ' box on the EA Common Settings window ( but not on the Platform Trade Permissions), whenever the Net Balance falls to a level, that you want it to disable opening trades. But checks the box back again, whenever the Net Balance has recovered, so that it can resume to opening trades?
- EA trade signal only
- How to track partial closes
- Disabling EA live trading on one tab disables on all
Instead of do check or uncheck, you can use this code in the EA
//+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { double MinimumLevel = 1000; if ( AccountBalance() < Minimum Level ) return; }
Biantoro Kunarto:
Is that simple? Thank you!
Instead of do check or uncheck, you can use this code in the EA
You're welcome
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