Jow3:
Hey, I am looking for an simple EA, that close all open trades after a period of time (seconds, minutes or hours)
I have found an EA that exactly does it "SimpleTimeBasedSL OrderManager EA v1.1" see attached file, but unfortunatley it closes also the pending orders, but I need an EA that closes only open trades.
Can someone add this feature to the EA or simply code a new one, that only does that?
It would be very appreciated, thank you
Please read documentation for OnTimer.
not a good idea to manage open positions using timer event.
loop through open positions, and check each position open time vs current time, and if position is open more than X minutes, close it. (leads to constant trade durations)
or close all positions on a specific time (like 23:00:00 or whatever), again checking the time/duration conditions are better be done in OnTick()
loop through open positions, and check each position open time vs current time, and if position is open more than X minutes, close it. (leads to constant trade durations)
or close all positions on a specific time (like 23:00:00 or whatever), again checking the time/duration conditions are better be done in OnTick()
Code2219 or probably 2319:
not a good idea to manage open positions using timer event.
loop through open positions, and check each position open time vs current time, and if position is open more than X minutes, close it. (leads to constant trade durations)
or close all positions on a specific time (like 23:00:00 or whatever), again checking the time/duration conditions are better be done in OnTick()
I close mine both using ontick and ontimer.
not a good idea to manage open positions using timer event.
loop through open positions, and check each position open time vs current time, and if position is open more than X minutes, close it. (leads to constant trade durations)
or close all positions on a specific time (like 23:00:00 or whatever), again checking the time/duration conditions are better be done in OnTick()

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
Hey, I am looking for an simple EA, that close all open trades after a period of time (seconds, minutes or hours)
I have found an EA that exactly does it "SimpleTimeBasedSL OrderManager EA v1.1" see attached file, but unfortunatley it closes also the pending orders, but I need an EA that closes only open trades.
Can someone add this feature to the EA or simply code a new one, that only does that?
It would be very appreciated, thank you