SQX 118 - StdDev is volatility it is not directional

Using SQX it is producing rules that are incorrect:


// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = ((((Bar opens above Highest(Main chart, 25) after opened below
and (StdDev(Main chart,82)[1] is falling for 3 bars at 2 bar ago))
and (StdDev(Main chart,20)[5] > StdDev(Main chart,30)[3]))
and (StdDev(Main chart,30) changes direction upwards))
and (StdDev(Main chart,30)[3] < 0.8));

ShortEntrySignal = ((((Bar opens below Lowest(Main chart, 25) after opened above
and (StdDev(Main chart,82)[1] is rising for 3 bars at 2 bar ago))
and (StdDev(Main chart,20)[5] < StdDev(Main chart,30)[3]))
and (StdDev(Main chart,30) changes direction upwards))
and (StdDev(Main chart,30)[3] > -0.8));


StdDev is a measure of volatility and is not a directional indicator of price. Therefore the rules should be the same comparisons for long and short entry signals, like the ones in yellow.



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

History

m
#1

mikeyc

15.02.2019 19:14

Task created

m
#2

mikeyc

16.02.2019 11:49
Voted for this task.
RL
#3

rickliao

19.02.2019 04:02
Voted for this task.
MF
#4

Mark Fric

19.02.2019 08:43

Status changed from New to Refused

Attachment OppositeBlocks.csv added

this was already fixed. Perhaps you have an old file with definition of negation blocks, it is file: \user\settings\OppositeBlocks.csv


I'm attaching the most recent file here. You can also delete or rename this file then it will use default negation values - same as in the file I'm attaching.

m
#5

mikeyc

19.02.2019 23:00
The file I have is identical to that one you have attached.  


If you look at the rules it is incorrect when it applies greater than (>), less than (<) and equals (=), and also for the rule  is rising for 3 bars at 2 bar ago


Which is probably a different rule not in the file.


It definitely does not work as expected, I believe there is a bug. I can attache the config and you can generate these incorrect strategies and see.

h
#6

hankeys

20.02.2019 06:58
Voted for this task.
MF
#7

Mark Fric

20.02.2019 09:34
ok, I got your comment now.


Rigth now, this is not supported. If you want to control the negation you have to use Signals, not indicators and comparisons.

With signal blocks you can specify exactly how they should be negated.


With conditions composed of indicators + comparisons this is not possible.


So you can achieve what you want if you'll select only signal blocks for StdDev, and unselect StdDev in Indicators blocks.

Signals for StdDev cover all the comparison possibilities and they will be negated correctly.


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