Symmetric entry and exit conditions for "channel" indicators

Hi Mark,

 

I have a problem that makes using many custom indicators difficult.

 

First of all, it relates to symmetrical entry and/or exit rules.  I like to use symmetrical entry and/or exit rules when creating forex strategies.

 

Now imagine I have a fantastic break out indicator developed. It has two outputs, a break-up price (price at which resistance has been breached) and a break-down price (price at which support has been breached).  I import this indicator into SQ and have two indicators which I select in the custom indicators list; price break-up and price break-down.

 

Now, SQ find for example a great long entry rule:

 

long entry if price > iCustom(“break out”….) -> price break-up

 

However, now due to the symmetry rule, the short entry rule becomes:

 

short entry if price < iCustom(“break out”….) -> price break-up

 

 

Clearly, the logical short entry would be:

 

short entry if price < iCustom(“break out”….) -> price break-down (NOT price break-up!!!)

 

How to handle this?  How to make SQ know that the opposite rule involves the other indicator output?

At the moment, custom “channel” type indicators (those with two outputs) are not used correctly when the rules are symmetrical.

 

This is a major problem for me, as I use lots of custom indicators such as this, and SQ cannot generate meaningful symmetrical rules.


I think the best approach is that for an SQ4 indicator / code block that has more than one output (such as a channel) you must specify the related output, to that SQ4 can choose the opposite output for the opposite entry or exit condition.  This links the two outputs so that the generation rules are symmetrical of buy and sell...


Thanks,

 

Mike

Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Feature
  • Status Fixed
  • Priority Normal

History

m
#1

mikeyc

07.10.2017 15:39

Task created

MF
#2

Mark Fric

09.10.2017 08:49

Priority changed from High to Normal

Hello Mike, 


I understand your point, and this will be covered in SQ4, there are actually several options how you can influence negation process - we'll fine tune them and describe them in the documentation.


This already works for indicators like BollingerBands that also has two outputs.


But first of all - do you plan to implement all your custom indicators in StrategyQuant ?

This would be the best option, because then SQ4 can compute them on the fly with different parameters, etc. You'll be able to specify which line should be negated to which using an annotation.


m
#3

mikeyc

09.10.2017 21:07
Hi Mark,


Yes, I would implement them in SQ4.  It would be great if SQ4 computed all the different parameters and cached the output in memory for super fast lookup of the outputs.


To be able to pair up outputs as the logical negative outputs would be great, so that custom "channel" indicators work as expected.


Thanks,


Mike

MF
#4

Mark Fric

10.10.2017 04:30

Status changed from New to Confirmed

this task is related to: https://roadmap.strategyquant.com/tasks/sq4_0505
MF
#5

Mark Fric

29.01.2018 10:27
we have to postpone it to Beta 9
MF
#6

Mark Fric

06.03.2018 11:45

Status changed from Confirmed to Fixed

we added special block snippet annotation @OppositeBlock. Using this annotation you are able to specify how exactly to negate given block - you can "negate" it to the same value (as needed here: https://roadmap.strategyquant.com/tasks/sq4_0505) or to a value with different channel.


I'll write an article about this where I'll explain it in more details.


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please