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
Attachment Data Settings.png added
to avoid this you need to set bars valid to 1, so the pending orders will be deleted with every other candle
This implementation doesn't make sense. It would be better to prevent trading outside of the chosen times.
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.
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
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
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