MarcParticipant
Average
Hi together,
How long is an order valid? Until end of trading day or period?
As Example:
My EA’s period is on hourly basis. When I place a stopp or limit at 10 o’clock will this order be cancelled at end of trading day or after 10:59:59?
Thank you
Marc
If the orders you are talking about are pending ones, they last 1 bar. So if your strategy is running on a daily timeframe, the orders will expire the next day, at Close.
On the 1 hour chart candles/bars last 1 hour so your pending orders will last one hour and be deleted at the close of the bar.
I will edit your topic title to make it a little easier to understand.
MarcParticipant
Average
Thank you very much for your help.
Is it possible to extend period until deletion?
Thank you in advance
Marc
No, but you can put the pending order continuously at each new bar in the code with a simple condition:
if PendingConditions=1 then //still true to put pending orders
buy 1 share at dhigh(0) stop
endif