Thank you Lupus , Very interesting idea and implementation , This is the code I use if I want something to run only in the tester, not sure its appropriate for you .
if(MQLInfoInteger(MQL_TESTER)){ if(PositionsTotal() == 0) { m_trade.Sell(0.1, _Symbol, 0, 0, 0, "Test Position"); Print("Opened test BUY position for hedging simulation"); } }
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
HedgeCover EA:
Intelligent position protection with one-hedge-per-position logic. Features magic number separation, cooldown timer, and max hedges limit. Prevents infinite hedging loops. Free MIT license.
Author: Lupus Materia