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.
릴리즈 노트: 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.
릴리즈 노트: 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.
오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


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 응답
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 응답
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 응답
Thinking about integrating the choppiness index for more weight. Would be an different indicator all together if so.
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?
applied to xrp and the bands are far too wide to be useful. see you for rev 2...