Pips outside of Bollinger band
-
How do I set a condition that gives me the the ability to trigger based on the number of pips travelled outside of upper or lower bands.
I tried adding +5 pips to the adjustments section of the condition.- I run optimisation on that field as it's a string
- Even when I add an arbitrary number 5000 it still works
-
@jzfusion What works and what is the problem? Did you take into account that for upper band you may need to add pips and on lower band you have to reduce the pips?!
-
Additionally, especially in very volatile candles, the value of both bands can change very rapidly. Are you working on cnadle ID 0 maybe?
-
Thanks guys. So far this is what I have done.
I created a constant with the pips in value 0.0001 but as @trader-philipps mentioned I forgot to take the sells into consideration.


How do I create a condition that allows me to buy or sell based on x amount of pips? I need that as a variable which can be set and used for optimisation.
-
What do you exactly mean by 'based on x amount of pips'? Do you want a minimum pips distance between two elements or prices, maybe?
-
@l-andorrà I want to have a parameter that triggers a buy every time the candle high or closes above the upper band by x pips or below the lower band.
Is that clear? So it's the distance travelled from the band to the extreme high or low. -
But will you be considerning the current bar (candle ID 0)? That can be very tricky and get many signals during that same bar. Is that what you want?
-
@l-andorrà I can use candle 1
-
@jzfusion If I understand your issue right, you need a condition where you need the difference of candle close (id 1) - BB upperband (cndle id1) > n pips. Is that right?
In that case do this for upper band:

-
Thanks @trader-philipps really appreciate this.
That looks closer to what I'm thinking but I want to be able to have a variable that I can set to buy or sell depending on the distance n pips.
Do I simply say buy or sell if difference = n pips using a formula. I want it to be a variable I can set. -
@jzfusion Sure, just create a constant and instead of value 5 I set in the conditions block, rihjt click on that input field and choose your constant.
-
Just curious. Why using that *Mathpow formula? I see you use it almost everywhere. If I remember correctly, it transforms values into pips. Is that correct?
-
@l-andorrà Well here I use it to get the right pip multiplicator. Hence that formular works on 2, 3 or 5 digits symbols as well.
-
Ok. Thanks.