Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
BollingerBandWidth indicator with up and down colors
I'm struggling with trying to modify the BollingerBandWidth indicator to plot green when it's going up and red when it's going down. This admittedly my first time trying to modify an indicator and I have no background in programming.
this is a simple bollinger band width indicator.
when the line is low indicates a sqeeze on the bollinger according to recent band history.
its a nice visual if that's part of your trading system.
in the pic, the bollinger indicator is the bband2 …
Can you help answer these questions from other members on NexusFi?
I think I found something that will work instead. I'll just do a EMA of 1 and then plot red/green based on the last value. Thanks anyway - I hope nobody wasted too much time.
Exported using NT version 7.0.1000.27
This is a generalized version of the Bollinger Bands with a few options added:
- The midband can be selected from a moving median, a moving mode or 27 different moving averages.
- Midband and channels can …
In order to set colours, you reference indicators by “this.Indicators” collection in the same order you added them. If the indicator has several lines, you reference them by “this.Indicators[N].Plots” collection. Have a look:
I’m not sure but I think “this.Indicators[2].Plots[0]” corresponds to middle Bollinger band, “this.Indicators[2].Plots[1]” to upper band and ““this.Indicators[2].Plots[2]” to lower band.
I should also like to add that the “decoration” can take place in the indicator itself or in the strategy. In the former case you have to change the indicator code, so you have to create and maintain a new version (or several). In the latter case you do it in the strategy.
It depends on the circumstances, in both cases you add one or two lines of code. I tend to decorate in the strategy, it’s more flexible.