TradingView
EltAlt
2022年5月26日午前4時2分

Simple Bollinger Band Width Percentile 

Bitcoin Perpetual FuturesFTX

詳細

I'm a big fan of The_Caretaker's BBWP and wanted to add it as a volatility indicator to some of my scripts, but since it is over 100 lines of code (plus spacing and comments) I wanted to find if there was a simpler way to get comparable results. SBBWP uses Pine 5 built in functions that I don't believe were available when The_Caretaker wrote BBPW. The main limitations compared to The_Caretaker's version is that it can only use SMA as its Basis Type and the colors are also not as pretty. I have not included alerts or scale lines since I'm not trying to replace BBWP, just give a simple example that you can easily build in to your scripts.

Full credit and respect to The_Caretaker!
コメント
EltAlt
The other disadvantage of this script is that ta.percentrank takes at least 100 bars to populate, so this simple version may not work at all for longer timeframes or newer listings.
詳細