Cannot restrict trading to 24/5 - positions held over the weekend - time range and Friday exit don't help

I initially thought that restricting positions to a 'time range' and checking 'exit at end of time range' would solve this, but SQ4 still holds positions over the weekend. Exit on Fridays does not solve this. Session = 24/5 does not solve this. I do not want open positions while I am asleep Monday to Friday, or at all over the weekend. Would be nice if this could be defined or if above options are the intended solution, they worked ;) 



A simple option to check the days, and the time range.



Indeed, looking at my best strategies, most profit comes from  'favourable gaps' on positions held over the weekend. It appears, looking through results (45 million generations so far) that genetic has a tendency to hone in on this, and random, if left long enough, will naturally bubble the same to the top of the results pile.

Attachments
No attachments
  • Votes +3
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

N
#1

nathan

25.10.2018 11:13

Task created

h
#2

hankeys

25.10.2018 12:08
this could be a problem with data - if there is no candle at the appropriate time of closing (friday, end of the day) - the BT will close the next day, next Monday
h
#3

hankeys

28.10.2018 08:49
Voted for this task.
h
#4

hankeys

28.10.2018 08:50
we have made some tests and need to say, that in some cases, the EOD will not work even if there is data and we see trades closed another day - there must be some bug
PK
#5

investor666

28.10.2018 09:02
Voted for this task.
N
#6

nathan

28.10.2018 11:42
I am having some success now with 113 using the range only settings, in my case I am using 06:06 and 18:06 and no longer see any trades open longer than 12 hours.
ZP
#7

Zbynek

28.10.2018 19:12
Voted for this task.
MF
#8

Mark Fric

29.10.2018 12:35
can you post an example strategy that is doing this + the exact data and the settings?


Exit at end of range or Friday, etc. works in a realistic way - which means that if you set the end time too late and the trading will finish before that,

the trades are not closed, and  they will be closed on the next tick on the next trading day.



MF
#9

Mark Fric

29.10.2018 14:18

Status changed from New to Waiting for information

N
#10

nathan

30.10.2018 20:34
sorry for the late reply...I have had more of a play around with this, and using range only limits it appears to be working as expected....I think I may have had exit on Fridays unnecessarily checked in addition to the range limits which was perhaps causing it too baulk. Could be my bad this one.
TB
#11

Tomas Brynda

05.11.2018 07:02

Status changed from In progress to Fixed


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