[B135] Incorrect opposite rule for HighestInRange/LowestInRange

Although I´ve specified this in the \user\settings\OppositeBlocks.csv


HighestInRange;LowestInRange LowestInRange;HighestInRange


SQX still generates strategies like this:


//-------------------------------------------------------------------- // Trading rule: Trading signals (On Bar Open) //-------------------------------------------------------------------- LongEntrySignal = (LWMA(Main chart,LWMAPeriod, PRICE_TYPICAL)[1] >= LowestInRange(Main chart, "15:40", "12:35")[1]); ShortEntrySignal = (LWMA(Main chart,LWMAPeriod, PRICE_TYPICAL)[1] <= LowestInRange(Main chart, "15:40", "12:35")[1]);


Please fix this. Thanks.

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

History

g
#1

geektrader

25.01.2022 18:42

Task created

g
#2

geektrader

25.01.2022 18:43
Voted for this task.
E
#3

Emmanuel

29.01.2022 14:51
Voted for this task.
g
#4

geektrader

03.02.2022 03:21
UPDATE 3. February 2022: deleting the OppositeBlocks.csv completely, the issue goes away, as it is the using the built-in opposite block from the Java source code. However, this should still work OK if, like in my example, it was correctly specified in the OppositeBlocks.csv. So the issue seems to come with the problem of SQX not correctly recognizing the opposite block if the OppositeBlocks.csv is used.

Although I´ve specified this in the \user\settings\OppositeBlocks.csv


HighestInRange;LowestInRange LowestInRange;HighestInRange


SQX still generates strategies like this:


//-------------------------------------------------------------------- // Trading rule: Trading signals (On Bar Open) //-------------------------------------------------------------------- LongEntrySignal = (LWMA(Main chart,LWMAPeriod, PRICE_TYPICAL)[1] >= LowestInRange(Main chart, "15:40", "12:35")[1]); ShortEntrySignal = (LWMA(Main chart,LWMAPeriod, PRICE_TYPICAL)[1] <= LowestInRange(Main chart, "15:40", "12:35")[1]);


Please fix this. Thanks.
b
#5

bentra

03.02.2022 20:58
Voted for this task.
g
#6

geektrader

15.02.2022 22:38
Update: if removing the OppositeBlocks.csv completely, it´s working correctly, so something is wrong with SQX parsing the OppositeBlocks.csv.

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