'Bars since order open' causes builder to stick on avaluating - error while building from template

If I include "Bars since order open" in the exit signal of a template the builder will not progress past the first step of 'evaluating strategies'.



Once that is removed from the template the builder will then generate strategies.


Build 135.867 Mac

Attachments
Template 1.sqx
(3.74 KiB)
  • Votes +2
  • Project StrategyQuant X
  • Type Bug
  • Status New
  • Priority Normal

History

JH
#1

Jabezz

22.01.2022 07:01

Task created

b
#2

bentra

22.01.2022 15:53
Voted for this task.
b
#3

bentra

22.01.2022 15:55
What a pain! You wouldn't need to force close exits after x bars if we had SWAP in the main engine letting SQX do its thing, right? You have to do this because of missing swap costs don't you?
JH
#4

Jabezz

23.01.2022 08:44
Yes correct it can be used for that but I also use it for an exit signal that closes the first bar in profit after a certain number of bars.Having tested it further I think the way the code calculates it isn't very efficient as on higher time frames and hence fewer bars it can get through it. So I'm not sure if this can be improved or not.
b
#5

bentra

24.01.2022 02:30
Can you just specify the "exit after bars" on the action entry tab instead of inserting it as an exit rule?
JH
#6

Jabezz

24.01.2022 05:05
Yes but that will also exit even if the position is loosing. I use the exit after xx bars only if in profit to close trades that are open too long. For example if trading intra day and the average trade length is 6 hours sometimes you can get outliers that are many days old so I'd just rather close them at the first profit bar.
b
#7

bentra

24.01.2022 05:27
Oh right AND not OR
E
#8

Emmanuel

29.01.2022 14:51
Voted for this task.
TT
#9

Tamas

11.09.2022 14:46

Subject changed from 'Bars since order open' causes builder to stick on avaluating to 'Bars since order open' causes builder to stick on avaluating - error while building from template


Votes: +2

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please