Linux 137rc2/3: Wrong symmetry in Strategy Code

Here is a section of a generated Strategy


LongEntrySignal = ((SRPercentRank(1, SRPercentRankLenght1,SRPercentRankATRPrd1, 3) is higher than Bar Minute[3] for 3 bars at 2 bar ago) and Vortex(Main chart, VortexChangesTrnPrd1)[2] changes trend Down); ShortEntrySignal = ((SRPercentRank(1, SRPercentRankLenght1,SRPercentRankATRPrd1, 3) is lower than Bar Minute[3] for 3 bars at 2 bar ago) and Vortex(Main chart, VortexChangesTrnPrd1)[2] changes trend UP);


It should be "higher" for both Long and Short entries, not "higher" and "lower."  Also, please use a positive number ( 0% <= n <= 100% ) instead of Minute because Minute is limited between 0 and 60. So, the above block should be:

LongEntrySignal = ((SRPercentRank(1, SRPercentRankLenght1,SRPercentRankATRPrd1, 3) is higher than 0 for 3 bars at 2 bar ago) and Vortex(Main chart, VortexChangesTrnPrd1)[2] changes trend Down); ShortEntrySignal = ((SRPercentRank(1, SRPercentRankLenght1,SRPercentRankATRPrd1, 3) is higher than 0 for 3 bars at 2 bar ago) and Vortex(Main chart, VortexChangesTrnPrd1)[2] changes trend UP);



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

History

m
#1

murty

03.06.2023 20:24

Task created

m
#2

murty

03.06.2023 20:24
Voted for this task.
E
#3

Emmanuel

05.06.2023 02:38
Voted for this task.
MF
#4

Mark Fric

05.06.2023 09:55

Status changed from New to Refused

this is not easily solvable, it is not an error in SQX.


Comparisons like IsGreater are negated to IsLower and vice versa, and it is correct for most of the indicators.


If you want tohandle ti differently there are two options:


1. use only signals, not individual indicators and comparisons - this is what signals are for exactly


2. more complicated - add a special negater - SQ.Negater - that will handle this specific use case and negate it the way you want it.


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