There are this to commands BollingerUp/BollingerDown implemented in PRT. The given syntax is:
bolUp=BollingerUp[20](close)
The parameter is obviously the period of the used SMA but is it possible to define how many standard deviations the band is above/below the SMA?
Of course I can program this manually but I wonder if this command allows to define the stdv.
you do it like this which is how PRT does it when you modify the Standard Deviations on the chart and use the visual builder:
bolup= Average[20](close)+3*std[20](close)
I’m aware of it (like I wrote). I’m just wondering if one can specify the stdv when using the PRT command for the bands.
Sorry I’m confused about your question because I thought my response, answers your question. In my example the bands will now be 3 standard deviations.
I’ve always programmed it myself manually, I’ve no knowledge of a way to override built-in parameters.
I would be glad if there was one!
Do you mean you want to compute the standard deviation yourself instead of using the built in function?
If yes, I do have Example Bollinger Indicator code from PRT but it does run much slower than the built-in function.
If I got what Despair said, he was thinking about something like this in a modified built-in BollingerUp:
bolUp=BollingerUp[20,2.0](close)
hopefully in a future release!
Roberto nailed it as so often. 😉 Would be nice to have this command in a future version.
Okay but how would this make a difference you still get the same result – what am I missing?
You are not missing anything David, the point is just “why not having this feature built in?”.
Furthermore, to keep existing code work seamless, the second parameter could be omitted, in which case 2.0 could be assumed by default.
That’s all!
added in my wish list: https://www.prorealcode.com/topic/centralization-of-queries-and-suggestions-on-prorealtime/page/9/#post-45607
(capability to change the default standard deviation coefficient) as suggested by Roberto.