- Hattori_Hanso: Anybody an idea how the loop could look like?
Same as any position select loop. MT5: first select a position via CPositionInfo, directly, or by 'MT4Orders' library (2016)
Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017) -
You also have to decide what you mean by 10 days. TimeCurrent() - OpenTime) > 10*PeriodSecond(PERIOD_D1) or 10 trading days iBarShift(s, PERIOD_D1, OpenTime) > 10.

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
Hi everybody,
i would like to gernerate a MT5 EA code which closes trades after certain days.
I loop all open trades and after a holding period of e.g. 10 days I would like to close them
Anybody an idea how the loop could look like?
Th