Indicator · Pine Script v5 · Own pane

Per Bak Self-Organized Criticality

by eddiebelaval

The Per Bak Self-Organized Criticality indicator calculates a composite fragility score by blending weights for tail risk from the SKEW index, volatility regimes from VIX terms, credit stress from HYG and LQD, and positioning from short volume data.

View on GitHub

GitHub stars7on the repository
Pine versionv5runs as is
Lines of code246
Settings11inputs
LicenceNone stated
Last update3 months ago24 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Per Bak Self-Organized Criticality plots the overall SOC value, individual component contributions, a historical average line, and threshold labels in a separate pane. Users adjust component weights that sum to 100 percent and set alert levels for building, elevated, and critical fragility states. The indicator draws on any timeframe but forces daily data from external symbols using request.security.

Details

Published by

eddiebelaval on GitHub

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Volatility & bands, Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Statistical Lookback Periodint252lookback
1️⃣ Tail Risk Weight %float34.0skew_weight
2️⃣ Volatility Regime Weight %float26.0vix_weight
3️⃣ Credit Stress Weight %float18.0credit_weight
4️⃣ Positioning Weight %float22.0pc_weight
Building Fragility Thresholdint40alert_building
Elevated Fragility Thresholdint55alert_elevated
Critical Fragility Thresholdint70alert_critical
Show Individual Componentsbooltrueshow_components
Show Historical Averagebooltrueshow_historical_avg
Show Component Labelsbooltrueshow_labels
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

CCI DC

by be-thomas
65 stars

This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le

Indicator v5 Oscillators & momentumVolatility & bands
Updated 4 days ago · GPL-3.0 GitHub repository of CCI DC

Trailing Drawdown

by palitojendthen
20 stars

The Trailing Drawdown indicator calculates and visualizes the percentage drop of a price series from its peak over a user-specified lookback period. It tracks maximum price levels within a rolling window and measures the current deviation from those peaks. Tra

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Trailing Drawdown

QFA Pro Elite Refined

by JasonTeixeira
9 stars

This indicator plots a smoothed fear index in a separate pane. It measures how far the current low sits below the highest close over a lookback, scales that reading by an ATR percentile, and smooths it with a zero-lag EMA. A volatility regime raises or lowers

Indicator v6 Oscillators & momentumVolatility & bands
Updated 12 days ago · Custom licence GitHub repository of QFA Pro Elite Refined

ICT Liquidity Void Fill

by ArunKBhaskar
575 stars

This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Liquidity Void Fill

[RS]Donchian Fans

by ricardosantos79
261 stars

This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high

Indicator v4 Support & resistanceTrend
Updated 4 years ago · None stated GitHub repository of [RS]Donchian Fans

Snag - VWAP

by dearvn
257 stars

This indicator plots a custom Anchored Volume-Weighted Average Price (VWAP) directly on the price chart along with optional standard deviation bands. Users can anchor the VWAP to standard time periods like sessions, weeks, or months, or to corporate events suc

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - VWAP

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers