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
Risk-Adjusted Momentum Oscillator calculates momentum via Rate of Change, Price Momentum, or Log Returns, applying Z-score normalization and adaptive smoothing. The script generates entry and exit signals, an optional MACD-style histogram, confidence bands, and predictive regression lines for momentum exhaustion. Users can configure risk lookback periods, threshold sensitivity, leading indicator modes, and an on-screen risk analytics table. As an indicator, it does not execute trades directly.
Drawdown-based risk-adjusted momentum scaling
Selectable algorithms including Rate of Change and Log Returns
Z-score normalization and adaptive smoothing
Linear regression prediction and exhaustion detection
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Momentum Calculation Period
int
20
momentum_length
Momentum Algorithm
string
Rate of Change
momentum_type
Risk Assessment Period
int
252
dd_lookback
Risk Smoothing Factor
int
5
dd_smoothing
Risk Scaling Factor
float
1.0
risk_scaling
Signal Line Period
int
14
signal_length
Z-Score Normalization Period
int
40
normalization_period
Enable Leading Mode
bool
true
enable_leading_mode
Acceleration Period
int
5
acceleration_period
Regression Length
int
10
prediction_length
Prediction Forward Bars
int
3
prediction_offset
Exhaustion Threshold
float
2.0
exhaustion_threshold
Show all 26 settings
Setting
Type
Default
Variable
Adaptive Smoothing
bool
true
adaptive_smoothing_enabled
Use Adaptive Thresholds
bool
true
use_dynamic_thresholds
Threshold Sensitivity
float
0.75
threshold_multiplier
Static Upper Threshold
float
0.5
static_upper
Static Lower Threshold
float
-0.5
static_lower
Display Entry/Exit Signals
bool
true
show_signals
Display MACD-Style Histogram
bool
true
show_histogram
Display Confidence Bands
bool
true
show_confidence_bands
Display Risk Analytics Table
bool
true
show_risk_table
Dark Mode Optimization
bool
true
use_dark_mode
Custom Color Scheme
bool
false
enable_custom_colors
Bullish
color
#4CAF50
custom_bullish
Bearish
color
#FF5252
custom_bearish
Neutral
color
#2196F3
custom_neutral
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 statistical analysis tool mines historical relationships between RSI values and candle volatility. It calculates a 14-period RSI from the previous bar and normalizes absolute price change using a 14-period Average True Range (ATR). Based on the normalized
Market Speedometer plots a 0-100 market speed reading in a separate pane. It measures movement by bar-to-bar change, true range, or a short average of recent bars, then ranks that movement against ATR and a percentile lookback. An EMA smooths the reading, and
The 8-Factor Composite Screener evaluates equities across fundamental and technical criteria, including valuation ratios, earnings and revenue growth, 12-month return momentum, proximity to 52-week highs, Stage 2 moving average alignment, benchmark relative st
This indicator transforms standard RSI calculations into logit space, estimating rolling distributions to derive empirical z-scores mapped back to the 0–100 RSI scale. Plotted in a separate pane, it features multi-horizon central lines—fast and structural cent
This indicator calculates the Relative Strength Index (RSI) alongside a simple moving average to generate directional momentum signals in a separate pane. It supports Break Flip and Break Continuous scanning modes for long and short setups. A wide array of opt
The Adaptive Cycle Detector estimates the dominant market cycle from WaveTrend oscillator zero-crossing frequency and applies smoothing to recommend adaptive indicator lengths. Fast markets with frequent crossings receive shorter lengths while slow swing marke