Restricting trades to a time range not working
4 replies
ChrisP
3 years ago #269432
Hello, I’m generating configurations that trade equities in the US stock market, and I want to restrict the trading to regular market hours only (09:30-1600 EST), NOT pre-market (04:00-09:30) or post-market (16:00-20:00) extended hours trading.
See attached image. Under “Build and Trading Options” I turn on “Limit Time Range” with desired time range entered, yet the configs generated still include a large number of trades outside of that time range.
What am I missing? Thanks in advance.
tomas262
3 years ago #269434
Hello,
what type of entry order is used with that specific strategy? Is it the market or stop order? The fill time can be outside that time range so you better active “Exit at End of Range” to eliminate possible pending orders waiting for a fill
loonly
1 year ago #277752
Hello Tomas, i have same situation, and yes i have STOP orders; using your solutions all orders already triggered (opened and running) will be closed, which is not what i want. i just want that NO new orders will be opened outside the range i selected.
bentra
1 year ago #277769
In order to NOT open positions during that time, all pending orders must be removed. There’s no way an EA can prevent a pending order from being triggered except to remove it.
I checked the MQL code and it looks like if you do ExitAtEnd OfRange = true plus OrderTypeToExit = 2 then it will allow positions to stay open and remove the pending orders which is probably what you want.
In SQX: OrderTypeToClose = PendingOnly should be what you want.
Jack Archer
8 months ago #283281
I am seeing the same behavior. It seems to just ignore the time range altogether. It will recognize when you set session to stock – then it limits it at lease to the normal session. Any clues?
Viewing 4 replies - 1 through 4 (of 4 total)