djsnowman06

Inverse Bands

I'm very new to trading. I've been toying with moving averages to trigger swing trades and wanted an indicator that would swell when price moves sideways and squeeze when price is trending.

So this is the inverse of the popular Bollinger Bands indicator. It makes a very easy identifier for price breakout when paired with your favorite fast moving average. When MA falls outside the bands, it indicates an emerging trend. Still requires some curve fitting, but it is a work in progress.

I hope this isn't a direct copy of something I am not aware of.
Release Notes: Worked out a reliable way to invert Bol Bands across a wider price range. Still needs some curve fitting via "Length" and "X Offset" settings. In future revisions ill try to automate the fitting based on current price maybe. Until then we will have to manually fit the settings.
Release Notes: Squared the percentage, not totally sure it helped. Did some fine tuning with settings, and changed the label of X offset to width, because that is essentially what it does.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Comments

Glad you enjoy it. I'm working on teasing out a "correction coefficient" that would make it more uniform across all price ranges and MA lengths. It has gone through quite a few revisions now and the code is more heavily based on Bol band width now.
+1 Reply
I think I have an idea for the problem. Standard deviation is broadly "stable" irrespectively of the price. I.e. you can have an instrument at $20 and another one at $1000 and they can both have the same standard deviation. However the fraction basis / dev would be way larger for the $20 instrument. Hence why it does not behave well in low prices. I wonder how we could work around it.
+1 Reply
Interesting idea. There seems to be problem with the bands getting extremely wide for low price instruments e.g. at $2 and the like.
+1 Reply
Thinking about integrating the choppiness index for more weight. Would be an different indicator all together if so.
Reply
I'm also considering shifting the MA up and down on the x axis to use in place of basis / dev . my goal is to have near zero deviation in trends and large swells when things go sideways, maybe some sort of inverse exponential analysis?
Reply
applied to xrp and the bands are far too wide to be useful. see you for rev 2...
Reply