An overlay indicator that fits two kernel regression lines, Rational Quadratic or Gaussian, and builds ATR or standard deviation envelopes around them.
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
Adaptive Kernel Regression Trading System marks first-pullback entries with an optional volume spike check and cooldown, and mean-reversion signals in regular and strong sigma tiers. A higher-timeframe kernel filter tints the background, and a zig-zag line tracks pivots. Optional buy and sell logic offers single or split position modes.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Kernel A Type
string
Rational Quadratic
i_kernelA_type
Kernel A Lookback
int
15
i_kernelA_lookback
Kernel A Bandwidth (h)
float
8.0
i_kernelA_bandwidth
Kernel A Alpha (RQ only)
float
1.0
i_kernelA_alpha
Kernel B Type
string
Gaussian
i_kernelB_type
Kernel B Lookback
int
24
i_kernelB_lookback
Kernel B Bandwidth (h)
float
16.0
i_kernelB_bandwidth
Kernel B Alpha (RQ only)
float
1.0
i_kernelB_alpha
Band Method
string
ATR
i_envelope_method
Band Multiplier
float
2.0
i_envelope_mult
ATR / StdDev Length
int
14
i_envelope_atr_len
Enable Pullback Detection
bool
true
i_pb_enabled
Show all 40 settings
Setting
Type
Default
Variable
Cooldown Bars
int
10
i_pb_cooldown
Require Volume Confirmation
bool
true
i_pb_vol_confirm
Volume Spike Multiplier
float
1.5
i_pb_vol_mult
Enable Mean Reversion
bool
true
i_mr_enabled
Regular Tier Sigma
float
1.5
i_mr_regular_sigma
Strong Tier Sigma
float
2.5
i_mr_strong_sigma
Residual StdDev Lookback
int
50
i_mr_residual_len
Enable HTF Filter
bool
true
i_htf_enabled
HTF Resolution
timeframe
60
i_htf_res
HTF Kernel Lookback
int
20
i_htf_lookback
HTF Kernel Bandwidth
float
12.0
i_htf_bandwidth
Show HTF Background Tint
bool
true
i_htf_show_bg
HTF Bullish Color (Blue)
color
#2196F3
i_htf_bull_color
HTF Bearish Color (Yellow)
color
#FFEB3B
i_htf_bear_color
Show Zig-Zag Trend Line
bool
true
i_show_zigzag
Pivot Lookback
int
5
i_zigzag_len
Zig-Zag Color
color
#2196F3
i_zigzag_color
Enable Buy/Sell Logic
bool
true
i_pos_enabled
Position Mode
string
Easy (100%)
i_pos_mode
Show Buy/Sell Signal Tags
bool
true
i_pos_show_tags
Tier 1 Entry Score
int
6
i_pos_tier1_score
Tier 2 Add-on Score (Complex Mode)
int
7
i_pos_tier2_score
Stop Loss (ATR mult)
float
2.0
i_pos_sl_atr
Take Profit (ATR mult)
float
3.0
i_pos_tp_atr
Trail Activate (ATR profit)
float
2.5
i_pos_trail_activate
Trail Distance (ATR)
float
1.0
i_pos_trail_dist
Partial Close at Kernel Mid
bool
true
i_pos_partial_kernel
Partial Close at Opposite MR
bool
true
i_pos_partial_mr
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.
Peak Reversal v3 identifies potential mean-reversion points by plotting configurable Keltner Channels alongside a squeeze detector directly on the price chart. It detects momentum extremes when candles cross or trade completely outside the inner or outer chann
Dynamic Extreme Channels & Reversals tracks evolving price highs and lows to plot adaptive channel bands and a midline directly on the price chart. When no new extremes occur within the specified lookback window, the channel boundaries interpolate toward price
This indicator classifies price action into four distinct market regimes: Trend, Expansion, Compression, or Mean Reversion. It determines states using a simplified Hurst exponent estimate, ADX slope thresholds, and realized volatility measurements. Based on th
This indicator plots directional trade signals, ATR-based target and stop-loss boxes, and SuperSmoother reversal bands directly on the price chart. It evaluates market conditions across selectable technical strategies, displaying confidence scores alongside an
This indicator plots standard Bollinger Bands directly on the price chart using a simple moving average and standard deviation bounds. It displays filled background channels between the center moving average and the outer bands. Optional mean-reversion signal
This indicator generates intraday trading signals by combining dual-sigma standard deviation bands, Heikin Ashi candle vectors, and a four-bar confluence score. It triggers long and short signals during defined trading sessions using either mean-reversion boun