The Dynamic Equity Allocation Model is an indicator that calculates and plots dynamic allocation percentages between equity and cash in a separate pane.
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
Dynamic Equity Allocation Model weighs five factors including market regime detection, risk metrics, valuation, sentiment, and macro conditions to recommend equity exposure levels from 0 to 100 percent. Users select model types like Conservative, Balanced, Aggressive or Adaptive, enable crisis detection, set target volatility and drawdown limits, and adjust factor weights. The indicator draws the main allocation line with optional component breakdowns, dynamic regime backgrounds, reference lines, and an analytics dashboard on the chart. It relies on volatility indicators, fundamentals, VIX data and other market metrics but has no exit rules or position sizing.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Allocation Model Type
string
Adaptive
model_type
Enable Crisis Detection System
bool
true
use_crisis_detection
Use Market Regime Detection
bool
true
use_regime_model
Target Portfolio Volatility (%)
float
12.0
target_portfolio_volatility
Maximum Portfolio Drawdown (%)
float
15.0
max_portfolio_drawdown
Enable Portfolio Risk Scaling
bool
true
enable_portfolio_risk_scaling
Risk Calculation Period (Days)
int
252
risk_lookback
Market Regime Weight (%)
float
35.0
w_regime
Risk Metrics Weight (%)
float
25.0
w_risk
Valuation Weight (%)
float
20.0
w_valuation
Sentiment Weight (%)
float
15.0
w_sentiment
Macro Weight (%)
float
5.0
w_macro
Show all 25 settings
Setting
Type
Default
Variable
Crisis VIX Level
float
40
crisis_vix_threshold
Crisis Drawdown Threshold (%)
float
15
crisis_drawdown_threshold
Crisis Credit Spread (bps)
float
500
crisis_credit_spread
Show Component Breakdown
bool
false
show_components
Show Dynamic Background
bool
true
show_regime_background
Show Reference Lines
bool
false
show_reference_lines
Show Analytics Dashboard
bool
true
show_dashboard
Show Confidence Bands
bool
false
show_confidence_bands
Smoothing Period
int
3
smoothing_period
Background Intensity (%)
int
95
background_intensity
Color Theme
string
EdgeTools
color_scheme
Optimize for Dark Theme
bool
true
use_dark_mode
Main Line Width
int
3
main_line_width
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 maps market structure and supply and demand zones on the price chart. It marks validated and optional unvalidated swing highs and lows using a pivot length and extra confirmation bars. Consolidation and impulse moves are measured against ATR to
This indicator marks forex trading sessions and opening ranges on the price chart. It can draw Sydney, Tokyo, Frankfurt, London, and New York session boxes or five- and fifteen-minute opening ranges, plus an optional opening channel and a day-open range. Day r
This indicator plots average daily range levels on the price chart, together with optional standard-deviation and Fibonacci levels scaled from that range. Users set the lookback in days, a scale factor, and the visibility, color, and line style of the ADR line
ATR Matrix calculates Average True Range and a 50-period Simple Moving Average to display multi-tier volatility levels and risk-reward metrics. It project stop levels using negative ATR multiples from an entry price, alongside target levels from 0x to 11x ATR
This indicator plots average bar range (ABR) measured move targets, opening range boxes, and historical key reference levels directly on the price chart. It projects bullish and bearish targets (0.5x, 1.0x, 1.5x, 2.0x ABR) from the previous session's close, al
This indicator calculates a base moving average (EMA, SMA, WMA, or HMA) and projects multiple symmetrical envelope bands around it directly on the price chart. Users can adjust the length, source, moving average type, and initial envelope multiplier. Additiona