Indicator · Pine Script v6 · On the chart

Adaptive Kernel Regression Trading System

by billy1030

An overlay indicator that fits two kernel regression lines, Rational Quadratic or Gaussian, and builds ATR or standard deviation envelopes around them.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code750
Settings40inputs
LicenceNone stated
Last update7 months ago16 Mar 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

billy1030 on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Trend, Mean reversion, Volatility & bands

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Kernel A TypestringRational Quadratici_kernelA_type
Kernel A Lookbackint15i_kernelA_lookback
Kernel A Bandwidth (h)float8.0i_kernelA_bandwidth
Kernel A Alpha (RQ only)float1.0i_kernelA_alpha
Kernel B TypestringGaussiani_kernelB_type
Kernel B Lookbackint24i_kernelB_lookback
Kernel B Bandwidth (h)float16.0i_kernelB_bandwidth
Kernel B Alpha (RQ only)float1.0i_kernelB_alpha
Band MethodstringATRi_envelope_method
Band Multiplierfloat2.0i_envelope_mult
ATR / StdDev Lengthint14i_envelope_atr_len
Enable Pullback Detectionbooltruei_pb_enabled
Show all 40 settings
SettingTypeDefaultVariable
Cooldown Barsint10i_pb_cooldown
Require Volume Confirmationbooltruei_pb_vol_confirm
Volume Spike Multiplierfloat1.5i_pb_vol_mult
Enable Mean Reversionbooltruei_mr_enabled
Regular Tier Sigmafloat1.5i_mr_regular_sigma
Strong Tier Sigmafloat2.5i_mr_strong_sigma
Residual StdDev Lookbackint50i_mr_residual_len
Enable HTF Filterbooltruei_htf_enabled
HTF Resolutiontimeframe60i_htf_res
HTF Kernel Lookbackint20i_htf_lookback
HTF Kernel Bandwidthfloat12.0i_htf_bandwidth
Show HTF Background Tintbooltruei_htf_show_bg
HTF Bullish Color (Blue)color#2196F3i_htf_bull_color
HTF Bearish Color (Yellow)color#FFEB3Bi_htf_bear_color
Show Zig-Zag Trend Linebooltruei_show_zigzag
Pivot Lookbackint5i_zigzag_len
Zig-Zag Colorcolor#2196F3i_zigzag_color
Enable Buy/Sell Logicbooltruei_pos_enabled
Position ModestringEasy (100%)i_pos_mode
Show Buy/Sell Signal Tagsbooltruei_pos_show_tags
Tier 1 Entry Scoreint6i_pos_tier1_score
Tier 2 Add-on Score (Complex Mode)int7i_pos_tier2_score
Stop Loss (ATR mult)float2.0i_pos_sl_atr
Take Profit (ATR mult)float3.0i_pos_tp_atr
Trail Activate (ATR profit)float2.5i_pos_trail_activate
Trail Distance (ATR)float1.0i_pos_trail_dist
Partial Close at Kernel Midbooltruei_pos_partial_kernel
Partial Close at Opposite MRbooltruei_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.

Similar Pine Scripts

Peak Reversal v3

by Zettt
43 stars

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

Indicator v6 Mean reversionVolatility & bands
Updated 1 year ago · None stated GitHub repository of Peak Reversal v3
6 stars

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

Indicator v6 TrendVolatility & bands
Updated 8 weeks ago · MIT GitHub repository of Capital41 Regime Matrix v3
4 stars

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

Indicator v6 Screeners & dashboardsTrend Repaints
Updated yesterday · None stated GitHub repository of Elton's Predictions Decision Engine

Bollinger Bands

by piecioshka
2 stars

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

Indicator v6 Volatility & bandsTrend
Updated 11 days ago · MIT GitHub repository of Bollinger Bands

4x4 Futures Ghost Matrix

by knectardev
1 stars

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

Indicator v5 Volatility & bandsMean reversion
Updated 9 months ago · None stated GitHub repository of 4x4 Futures Ghost Matrix

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers