Symmetric optimization is impossible for levels (WPR as an example)

Although this is correctly done during the building, once in the Optimizer, the levels for example for WPR are being represented in 2 separate variables. Symmetric optimization is impossible for the levels for this reason. See this (pseudo) code that SQX generates:

double WPRLevel = -71.6;
double WPRLevel2 = -28.4;
....
....



LongExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] < WPRLevel); ShortExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] > WPRLevel2);



While this results in symmetry for the actual trading rule/results, because both levels are indeed the exact opposite of each other, they are represented in 2 separate variables in the Optimizer later on. To correct this, SQX should only use 1 level variable and instead create the code like this:


double WPRLevel = 71.6;
....
....



LongExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] < 0 - WPRLevel); ShortExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] > -100 + WPRLevel);

Attachments
No attachments
  • Votes +5
  • Project StrategyQuant X
  • Type Bug
  • Status New
  • Priority Normal

History

g
#1

geektrader

30.03.2022 20:36

Task created

g
#2

geektrader

30.03.2022 20:36
Voted for this task.
g
#3

geektrader

30.03.2022 20:37

Description changed:

Although this is correctly done during the building, once in the Optimizer, the levels for example for WPR are being represented in 2 separate variables. Symmetric optimization is impossible for the levels for this reason. See this (pseudo) code that SQX generates:

double WPRLevel = -71.6;
double WPRLevel2 = -28.4;
....
....



LongExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] < WPRLevel); ShortExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] > WPRLevel2);


While this results in symmetry for the actual trading rule/results, because both levels are indeed the exact opposite of each other, they are represented in 2 separate variables in the Optimizer later on. To correct this, SQX should only use 1 level variable and instead create the code like this:



double WPRLevel = 71.6;
....
....



LongExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] < 0 - WPRLevel); ShortExitSignal = (Williams % R(Main chart,WPRPeriod)[WPRShift] > -100 + WPRLevel);

b
#4

bentra

30.03.2022 21:53
Voted for this task.
E
#5

Emmanuel

31.03.2022 12:10
Voted for this task.
M
#6

MM1

01.04.2022 01:00
Voted for this task.
CG
#7

Chris G

14.09.2022 14:13
Voted for this task.
CG
#8

Chris G

15.11.2022 12:36
This feature is really needed!
b
#9

bentra

13.12.2022 16:46
Missed milestone

Votes: +5

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please