Reply

Exit after xxx seconds

3 replies

chakran

Subscriber, bbp_participant, community, 1 replies.

Visit profile

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…

 

 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

Mike H.

Subscriber, bbp_participant, community, 76 replies.

Visit profile

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…

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

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

0

Viewing 3 replies - 1 through 3 (of 3 total)