Strategies using MACD Indicator toggle Main/Signal line for symmetry

When SQX generates a strategy based on the MACD Indicator and symmetrical short/long entries is enabled, SQX will use the Signal line for one entry (i.e. the Short position) and the Main line for the other (i.e. the Long position). SQX should only toggle Rising/Falling for symmetry, not the actual line being used.
Attachments
Build strategies.cfx
(21.45 KiB)
Strategy 03633.sqx
(62.65 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

RH
#1

rhartstein

18.07.2019 03:05

Task created

RH
#2

rhartstein

18.07.2019 03:21
Just looking through other indicators, and I noticed there's similar behavior with the Bollinger Bands. It will use the Upper band on the Long entry and the Lower band on the Short entry. I have mixed feelings about this - it may be this is good symmetry. I guess I'd like to test it both ways. Can it be configurable to where it will always use the same band (upper or lower) for both long/short? And alternatively configurable to where it will alternate between upper/lower across long/short?
b
#3

bentra

18.07.2019 10:35
Voted for this task.
MF
#4

Mark Fric

18.07.2019 14:31

Status changed from New to Fixed

I found a problem and fixed it, it was a bug. When negating MACD.Signal it always negated it to MACD.Main, ths wasn't intention.


Negating BollingerBands.Upper to Lower and opposite is intentional.


There is a way of controlling negation, please check section 5.4 Controlling conditions negation in SQ Users Guide PDF 

 In short - you can use definition file OppositeBlocks.csv to specify whch block should be negated to which.


It works good for signals, that's why it is preferred method of generating strategies, instead of randomly combining indicators and comparisons.



Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please