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.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
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.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Statistical Lookback Period
int
252
lookback
1️⃣ Tail Risk Weight %
float
34.0
skew_weight
2️⃣ Volatility Regime Weight %
float
26.0
vix_weight
3️⃣ Credit Stress Weight %
float
18.0
credit_weight
4️⃣ Positioning Weight %
float
22.0
pc_weight
Building Fragility Threshold
int
40
alert_building
Elevated Fragility Threshold
int
55
alert_elevated
Critical Fragility Threshold
int
70
alert_critical
Show Individual Components
bool
true
show_components
Show Historical Average
bool
true
show_historical_avg
Show Component Labels
bool
true
show_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.
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
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
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
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
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
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