Bollinger bands rising / falling not symmetrical

BB is plotting both volatility and price (combo of a moving average and a StdDev indicator) so it is currently impossible to modify the OppositeBlocks.csv file to get proper symmetry with the one band is falling/rising and other band is falling/rising blocks. 

LongEntrySignal = ((BollingerBands(Main chart,49, 1.9).Lower[1] is falling for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Slow%D[1] is rising for 9 bars));

ShortEntrySignal = ((BollingerBands(Main chart,49, 1.9).Upper[1] is rising for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Fast%K[1] is falling for 9 bars)); Should be this for true symmetry (and to retain indicator individuality):
LongEntrySignal = ((BollingerBands(Main chart,49, 1.9).Lower[1] is rising for 5 bars AND BollingerBands(Main chart,49, 1.9).Upper[1] is rising for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Slow%D[1] is rising for 9 bars));

ShortEntrySignal = ((BollingerBands(Main chart,49, 1.9).Upper[1] is falling for 5 bars AND BollingerBands(Main chart,49, 1.9).Lower[1] is falling for 5 bars )
and (Stochastic(Main chart,13, 72, 76).Fast%K[1] is falling for 9 bars));

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

History

b
#1

bentra

03.08.2019 03:31

Task created

b
#2

bentra

03.08.2019 11:16
On second thought, this one will be challenging to get it symmetrical. BB indicator charts both price and volatility. Lower bands falling can be because of price falling OR because of increasing volatility. Upper bands falling can be because of decreased volatility or price falling. Lower bands rising can be because of price rising OR decreasing vol. Upper bands rising can be because of price increasing OR increasing vol.

We could negate the price falling / rising aspect with an algorithm to include only volatility such as:
(Bands - price) rising / falling, but this would be the same as standard deviation rising / falling. 

Or another idea to make symmetrical Bollinger bands rising / falling would be:
Upper bands AND lower bands both rising / 
Upper bands AND lower bands both falling.

KL
#3

kainc301

03.08.2019 17:24
The edit made to your assertion in the previous comment is correct. Because Bollinger Bands measures volatility, short/long signals are direction agnostic when the lower line falls and the upper line rises as this happens at the same time due to volatility spikes. The proposed edit for Bollinger Bands needs to be looking for either long or short when both the Upper band rises and the lower band falls Or when the upper band falls and the lower band rises. A band rising/falling does not give any indication of a long or short. These conditions need to change to look for signals based on the Bollinger Band volatility instead. The focus for using Bollinger Bands needs to be based on whether they are expanding/contracting vs moving up or down.
KL
#4

kainc301

03.08.2019 17:25
Voted for this task.
b
#5

bentra

03.08.2019 20:15
Voted for this task.
b
#6

bentra

03.08.2019 21:32

Description changed:

A falling lower band means the same thing as a rising upper band (in both cases, bands are widening = more volatility) so this make no sense:

LongEntrySignal = ((BollingerBands(Main chart,49, 1.9).Lower[1] is falling for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Slow%D[1] is rising for 9 bars));

ShortEntrySignal = ((BollingerBands(Main chart,49, 1.9).Upper[1] is rising for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Fast%K[1] is falling for 9 bars)); Should be this for true symmetry:
LongEntrySignal = ((BollingerBands(Main chart,49, 1.9).Lower[1] is rising for 5 bars AND BollingerBands(Main chart,49, 1.9).Upper[1] is rising for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Slow%D[1] is rising for 9 bars));

ShortEntrySignal = ((BollingerBands(Main chart,49, 1.9).Upper[1] is falling for 5 bars AND BollingerBands(Main chart,49, 1.9).Lower[1] is falling for 5 bars )
and (Stochastic(Main chart,13, 72, 76).Fast%K[1] is falling for 9 bars));

KL
#7

kainc301

05.08.2019 17:16
I think the best approach to this is to create a Bollinger Bands Expanding and a Bollinger Bands Contracting block. This way it can just be used in place of Bollinger Bands rising/falling and would solve the issue. 


For BB Expanding, the high band would rise and the lower band would fall. For BB contracting, the high band would fall and the low band would rise. If these were used as replacements for the standard rising/falling, there would be no need to worry about symmetry as these blocks would simply not be used.

b
#8

bentra

05.08.2019 17:30
"For BB Expanding, the high band would rise and the lower band would fall. "

Why do you say that? Then it's the same as stddev rising/falling and also it would be non directional so we'd have to make expanding be the opposite block for expanding and contracting be the opposite block for contracting.
KL
#9

kainc301

05.08.2019 17:37
That's what I was implying. Expanding and contracting would be considered opposite blocks. 
b
#10

bentra

05.08.2019 17:57
If we make it exactly the same as stddev rising / falling then may as well leave it out, that's why I originally concluded to retain indicator originality the only thing I can think of is both bands rising / both bands falling.
KL
#11

kainc301

05.08.2019 18:01
That's doable too however you would enter the trade long after the expansion happened if you did that. I would say that would need to be a pair of separate block all together as well. 
MF
#12

Mark Fric

06.08.2019 08:08

Status changed from New to Refused

refudes, unclear what you are proposing. Symmetry can be controlled using predefined conditions (signals) and OppositeBlocks.csv file, see the User's Guide
b
#13

bentra

06.08.2019 23:00
We're both saying it is a special indicator being both volatility indicator and a price indicator together so it is currently impossible to get BB rising/falling symmetrical using the opposite blocks file.

 

KL
#14

kainc301

07.08.2019 01:01
@Mark Summary:


Top BBand rising and Bottom BBand falling occur at the same time when it expands. So this should not be considered as opposite conditions as it occurs at the same time during expansion and can trigger both long and short conditions at the same time.  


The proposed solution? Make 4 blocks for BBands:


1 expanding block (Top band rising && bottom band falling simultaneously)

1 contracting block (Top band falling && bottom band rising simultaneously)


Expanding && contracting blocks are considered opposite blocks for symmetry


1 Rising block (both bands rising simultaneously)

1 Falling block (both bands falling simultaneously)


Rising && falling blocks are considered opposite blocks for symmetry


b
#15

bentra

07.08.2019 02:53
@Keinc, BBR indicator already exists so you could put a feature req in for the BBR indicator to be made a predefined signal and then you'd have what you propose but like I said it would be the same as StdDev rising/falling which already is a predefined signal so what's the point?
b
#16

bentra

07.08.2019 04:05

Description changed:

BB is plotting both volatility and price (combo of a moving average and a StdDev indicator) so it is currently impossible to modify the OppositeBlocks.csv file to get proper symmetry with the one band is falling/rising and other band is falling/rising blocks. 

LongEntrySignal = ((BollingerBands(Main chart,49, 1.9).Lower[1] is falling for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Slow%D[1] is rising for 9 bars));

ShortEntrySignal = ((BollingerBands(Main chart,49, 1.9).Upper[1] is rising for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Fast%K[1] is falling for 9 bars)); Should be this for true symmetry (and to retain indicator individuality):
LongEntrySignal = ((BollingerBands(Main chart,49, 1.9).Lower[1] is rising for 5 bars AND BollingerBands(Main chart,49, 1.9).Upper[1] is rising for 5 bars)
and (Stochastic(Main chart,13, 72, 76).Slow%D[1] is rising for 9 bars));

ShortEntrySignal = ((BollingerBands(Main chart,49, 1.9).Upper[1] is falling for 5 bars AND BollingerBands(Main chart,49, 1.9).Lower[1] is falling for 5 bars )
and (Stochastic(Main chart,13, 72, 76).Fast%K[1] is falling for 9 bars));

MF
#17

Mark Fric

07.08.2019 09:19
it is possible to create a new block that will contain multipe checks - similar to other blocks where we check cross of DI+ and DI-.


I'm not sure what exactly you want to make, but if you want a special type of conditions you can cerate a special signal block for 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