Exit after xxx seconds
3 replies
chakran
10 years ago #111502
Hello,
one short question:
Which ruleset I should use for a condition “exit a trade after 60 seconds”?
Thanks in advance…
Mark Fric
10 years ago #122512
hello,
there is no condition to exit the trade after 60 seconds. Instead of using time constraints EA Wizard uses bars – you can exit after 1,2,…x bars from opening the trade.
If you trade on M1 timeframe you can use ExitAfterBars=1 in your Enter at market/stop/limit order.
This means that the trade will be closed after 1 bar = 1 Minute.
Mark
Mark
StrategyQuant architect
Mike H.
10 years ago #122763
What about a Rule as: IF Minute(0) = 1 THEN Close Position 1000.
In the Add Condition Dialog > (Time Values) > Minute > = > (Other) > Number 1
Then if you want it to be less than 60 seconds, it can be modified in the code before you compile it…
Mark Fric
10 years ago #122800
this would close the trade in the beginning of every hour (when minute = 0).
There’s no condition to measure how many seconds passed since the order was placed, but ExitAfterBars functionality can be used.
Mark
StrategyQuant architect
Viewing 3 replies - 1 through 3 (of 3 total)