OPEN-SOURCE SCRIPT
Market Regime & Risk Dashboard

An analytics and risk dashboard. It tells you what state the market is in and how much to risk. It does NOT generate buy or sell signals and makes no claim of edge.
What it shows
- Volatility regime: realized volatility bucketed by its own percentile history (Low / Normal / High / Extreme)
- Realized volatility and its percentile rank
- Trend regime: Kaufman Efficiency Ratio bucketed into Trending / Mixed / Choppy
- ATR % of price, an ATR-based stop distance, and a fixed-fractional position size for your chosen risk percent
- Drawdown from the recent high
How to read it
Volatility regime drives position sizing: in Extreme regimes the same percent risk implies a far smaller position, and the dashboard does that maths for you. The trend regime is descriptive, not predictive.
Honest by design
- No buy/sell signals, no alpha claim. This is a measurement tool, not a prediction.
- Non-repainting: every value is a function of confirmed closes, no request.security, no future data. The current forming bar updates in real time, which is normal, not historical repaint.
- Every number is defined, with its limitations stated.
Open-source and MIT licensed.
Disclaimer: impersonal educational and analytics tool. This is not investment advice, not a personalised recommendation, and carries no performance guarantee. Past results do not predict future results. You are solely responsible for your own trading decisions.
What it shows
- Volatility regime: realized volatility bucketed by its own percentile history (Low / Normal / High / Extreme)
- Realized volatility and its percentile rank
- Trend regime: Kaufman Efficiency Ratio bucketed into Trending / Mixed / Choppy
- ATR % of price, an ATR-based stop distance, and a fixed-fractional position size for your chosen risk percent
- Drawdown from the recent high
How to read it
Volatility regime drives position sizing: in Extreme regimes the same percent risk implies a far smaller position, and the dashboard does that maths for you. The trend regime is descriptive, not predictive.
Honest by design
- No buy/sell signals, no alpha claim. This is a measurement tool, not a prediction.
- Non-repainting: every value is a function of confirmed closes, no request.security, no future data. The current forming bar updates in real time, which is normal, not historical repaint.
- Every number is defined, with its limitations stated.
Open-source and MIT licensed.
Disclaimer: impersonal educational and analytics tool. This is not investment advice, not a personalised recommendation, and carries no performance guarantee. Past results do not predict future results. You are solely responsible for your own trading decisions.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.