OPEN-SOURCE SCRIPT
Updated Standard Deviation (+OB Pressure)

Standard Deviation (+ Order Book Pressure)
======================================================
This is a TradingView indicator that draws:
- A smoothed moving average in the middle (actually RMA of your chosen
source over "Length" bars -- not a simple SMA despite the script name).
- Bands at 1 through 6 standard deviations above and below that line,
using the same length for the standard deviation. You can limit how
many sigma levels show (1 to 6) with "Max Sigma Level".
- Optional shading between +1σ and -1σ ("Fill ±1σ Zone").
- Optional text labels on the right (last bar) for MA and each visible
sigma line ("Show Labels").
MAIN SETTINGS
-------------
Length Bars for RMA and standard deviation (default 20).
Source Price series (default close).
Max Sigma Level How many ±σ lines to draw (1-6).
Fill ±1σ Zone On/off for the band between +1σ and -1σ.
Show Labels On/off for MA and σ labels on the last bar.
Colors Center line, positive-side bands, negative-side bands.
LIMITS / NOTES
--------------
- max_bars_back and max_labels_count are set to 500 in the indicator
declaration.
- Triangle labels are refreshed on confirmed bars to avoid clutter.
For questions about interpretation, this is a volatility-band tool around
a smoothed average with an optional synthetic pressure marker -- not
financial advice.
======================================================
This is a TradingView indicator that draws:
- A smoothed moving average in the middle (actually RMA of your chosen
source over "Length" bars -- not a simple SMA despite the script name).
- Bands at 1 through 6 standard deviations above and below that line,
using the same length for the standard deviation. You can limit how
many sigma levels show (1 to 6) with "Max Sigma Level".
- Optional shading between +1σ and -1σ ("Fill ±1σ Zone").
- Optional text labels on the right (last bar) for MA and each visible
sigma line ("Show Labels").
MAIN SETTINGS
-------------
Length Bars for RMA and standard deviation (default 20).
Source Price series (default close).
Max Sigma Level How many ±σ lines to draw (1-6).
Fill ±1σ Zone On/off for the band between +1σ and -1σ.
Show Labels On/off for MA and σ labels on the last bar.
Colors Center line, positive-side bands, negative-side bands.
LIMITS / NOTES
--------------
- max_bars_back and max_labels_count are set to 500 in the indicator
declaration.
- Triangle labels are refreshed on confirmed bars to avoid clutter.
For questions about interpretation, this is a volatility-band tool around
a smoothed average with an optional synthetic pressure marker -- not
financial advice.
Release Notes
Draws: - Middle RMA
- Bands at (n)-standard deviations above and below the Mean
- Optional shading between +1σ and -1σ ("Fill ±1σ Zone").
- Optional text labels on the right (last bar) for MA and each visible
sigma line ("Show Labels").
MAIN SETTINGS
-------------
Length Bars for RMA and standard deviation (default 20).
Source Price series (default close).
Max Sigma Level How many ±σ lines to draw (1-6).
Fill ±1σ Zone On/off for the band between +1σ and -1σ.
Show Labels On/off for MA and σ labels on the last bar.
Colors Center line, positive-side bands, negative-side bands.
LIMITS / NOTES
--------------
- max_bars_back and max_labels_count are set to 500 in the indicator
declaration.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.