Limit Time Range - Please add an option to delete pending orders outside of this range limit

In the attached strategy and image (exported excel + strategy settings) it shows trades opening outside of the specified Limit Time Range settings I put in place.



I've set my Limit Time Range settings to:
- Time Range From = 01:00
- Time Range To = 23:00


Despite these settings being in place, there are still trades opening between 23:00 and 01:00 in the attached strategy. 


If this happens in live trading, this will cost me dearly as spreads are VERY high around roll over for any broker (broker I'm building strategy for is GMT + 2 and roll over is midnight).


Thanks

Attachments
EURUSD H1 Strategy 110125 - Optimization 0912.sqx
(134.13 KiB)
Limit Time Range not working.png
(224.60 KiB)
  • Votes +3
  • Project StrategyQuant X
  • Type Feature
  • Status New
  • Priority Normal

History

JK
#1

Insanity82007

07.04.2020 03:04

Task created

JK
#2

Insanity82007

07.04.2020 03:05
Voted for this task.
JK
#3

Insanity82007

07.04.2020 03:05

Attachment Data Settings.png added

Here are the settings for EURUSDCMC
h
#4

hankeys

07.04.2020 08:37
you need to know that this setting could only operate pending orders for STOP or LIMIT strategies, so open trades could be outside those hours, because the pending order could be filled later


to avoid this you need to set bars valid to 1, so the pending orders will be deleted with every other candle

JK
#5

Insanity82007

07.04.2020 09:31
Thanks hankeys.


This implementation doesn't make sense. It would be better to prevent trading outside of the chosen times.

JK
#6

Insanity82007

07.04.2020 09:33
This implementation also doesn't make sense for another reason. Bars Valid is only available in build, but not retest or optimize.


I would set this up as a feature, but I believe a bug is still the better ticket option because when a feature doesn't make sense, it should be a bug because people won't understand how to use it properly.

h
#7

hankeys

07.04.2020 13:24
this is the same behavior as it was in the old SQ3, so its with us for years and we are using it in our strategies


i agree that it could work as you stated, but the change need to be done as another option or feature, so our strategies will keep the same behavior and compatibility


and if you want to prevent open trades outside the hours, you can still use the template - but some experience is needed how to do it


some feedback from devteam is needed - everything could be solved


the same feature could be - if using end of day or friday - close only open trades and keep the pendings....this cant be done either

g
#8

geektrader

07.04.2020 17:12
Yes, this is normal behavior like it always was with SQ. I think an extra option would be needed like "Delete Pending Orders too" next to that option. SQ would then simply delete all pending order when the trading hours are not in place.
JK
#9

Insanity82007

08.04.2020 02:33

Subject changed from Limit Time Range option not working correctly - trades still opening to Limit Time Range - Please add an option to delete pending orders outside of this range limit

Type changed from Bug to Feature

JK
#10

Insanity82007

08.04.2020 02:35
Ok guys, thanks for the comments. I can see how this feature evolved over time and can be confusing for someone who never used earlier SQ versions like myself.


I've updated this ticket to be a feature request with the option to delete pending orders outside of the time range limit.


This will also go hand in hand with the bug ticket I raised here: https://roadmap.strategyquant.com/tasks/sq4_6052

h
#11

hankeys

08.04.2020 09:33
Voted for this task.
b
#12

beppil

11.04.2020 10:53
Voted for this task.

Votes: +3

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please