OPEN-SOURCE SCRIPT
Jurik Moving Average Approximation

🚀 JURIK MOVING AVERAGE APPROXIMATION (JMA)
The Jurik Moving Average Approximation (JMA), engineered by gunebak4n, is an advanced, ultra-low lag, adaptive noise-reduction indicator framework designed for TradingView. Built upon the legendary signal-processing principles conceptualized by Mark Jurik (Jurik Research), this open-source implementation resolves the classical moving average tradeoff between lag and smoothness—delivering crisp, real-time trend tracking without erratic price oscillations or excessive signal delay.
Standard moving averages (such as SMA, EMA, or WMA) suffer from a fundamental lag-vs-noise dilemma: lengthening the period removes noise but introduces severe lag, while shortening the period reduces lag at the expense of excessive whipsaws. JMA overcomes this limitation by utilizing an adaptive, multi-stage recursive filtering process combined with a dynamic phase-adjustment mechanism. The result is an ultra-smooth, responsive curve that reacts instantly to sharp breakouts and price gaps while remaining stable during choppy, sideways consolidation.
💡 CORE DESIGN PRINCIPLES
🧭 Eliminating the Lag vs. Noise Dilemma
Conventional moving averages lag behind sudden market moves—especially during aggressive gaps or volatility expansions. JMA acts as a near-ideal noise filter: it tracks price action with minimal temporal delay while suppressing high-frequency market noise that leads to false signals.
🎛️ Fine-Tuned Phase & Power Control
Unlike standard averages that offer only a period setting, JMA provides modular fine-tuning controls:
• Phase (-100 to +100): Adjusts the balance between lag reduction and overshoot prevention. Positive values accelerate responsiveness for fast-moving markets, while negative values increase smoothness.
• Power: Controls the acceleration exponent of the smoothing curve, allowing traders to customize how aggressively the filter adapts to price velocity.
🌐 Native Multi-Timeframe (MTF) Capability
Equipped with Pine Script v5 multi-timeframe evaluation engines (timeframe parameter), JMA enables you to seamlessly overlay higher-timeframe trend lines (e.g., Daily or Weekly JMA) onto lower-timeframe execution charts without breaking visual layout or causing repainting.
💡 KEY FEATURES
• Ultra-Low Lag Adaptive Tracking: Captures rapid price breakouts and market gaps instantaneously, giving traders earlier macro directional bias compared to traditional exponential or weighted moving averages.
• Dynamic Trend & Bar Coloring: Includes an optional visual execution engine that dynamically colors both the JMA line and chart price bars based on real-time trend direction (Bullish = Green, Bearish = Red).
• Integrated Alert System: Features pre-configured, non-repainting alertcondition events for bullish and bearish trend flips, enabling instant mobile notifications or webhooks for automated trading workflows.
🔬 MATHEMATICAL ARCHITECTURE
[code]
[STEP 1: Adaptive Coefficient Derivation]
• Beta Coefficient: Beta = (0.45 * (Length - 1)) / (0.45 * (Length - 1) + 2.0)
• Alpha Coefficient: Alpha = Beta ^ Power
• Phase Ratio (PR): Mapped from Phase input (-100 to +100) into range [0.5, 2.5]
[STEP 2: Multi-Stage Recursive Filtering Engine]
• Stage 1 (Raw Smoothing): e0 = (1 - Alpha) * Source + Alpha * e0[1]
• Stage 2 (Trend Detrending): e1 = (Source - e0) * (1 - Beta) + Beta * e1[1]
• Stage 3 (Phase-Adjusted Offset): e2 = (e0 + PR * e1 - JMA[1]) * (1 - Alpha)^2 + Alpha^2 * e2[1]
[STEP 3: Final JMA Value Generation]
• JMA_Current = JMA_Previous + e2
[/code]
🛠️ USAGE FRAMEWORK
1. Trend Bias & Macro Axis
• Green JMA Line / Green Bars: Bullish regime. Focus on long entries, trend continuations, or buying pullbacks toward the JMA line.
• Red JMA Line / Red Bars: Bearish regime. Focus on short entries, trend continuations, or selling relief rallies toward the JMA line.
2. Dynamic Support & Resistance / Trailing Stop
Due to its low-lag and ultra-smooth profile, JMA functions as an exceptional dynamic trailing stop-loss boundary during sustained trend movements, preventing premature exits caused by minor intraday noise.
3. Replacement Proxy for Oscillators
Standard indicators (MACD, RSI, Stochastics) often generate false crossovers when calculated using raw price or EMAs. Passing the smoothed JMA output into these classical formulas yields significantly cleaner, higher-conviction oscillator signals.
⚙️ SYSTEM CHARACTERISTICS
• Zero Repainting: All calculations strictly evaluate on closed historical bar states.
• Fully Parameterized Inputs: Customize source price, length, phase, power, bar coloring, and color themes.
• Asset-Agnostic Engine: Operates with high precision across Equities, Forex, Crypto, Commodities, Futures, and Indices.
• Clean & Modern UI: Designed for high visual clarity on both dark and light chart themes.
📌 CREDIT & ATTRIBUTION
The Jurik Moving Average Approximation script is engineered and published by gunebak4n on TradingView.
This indicator is based on the mathematical concepts of the Jurik Moving Average (JMA) originally conceptualized by Mark Jurik (Jurik Research).
⚠️ DISCLAIMER
This script is an open-source community implementation and mathematical approximation of the JMA concept. It is not affiliated with, officially supported by, or endorsed by Mark Jurik or Jurik Research. This indicator is a technical analysis visualization tool and does not provide financial advice, automated trading signals, or profit guarantees. Always perform thorough backtesting and practice strict risk management.
The Jurik Moving Average Approximation (JMA), engineered by gunebak4n, is an advanced, ultra-low lag, adaptive noise-reduction indicator framework designed for TradingView. Built upon the legendary signal-processing principles conceptualized by Mark Jurik (Jurik Research), this open-source implementation resolves the classical moving average tradeoff between lag and smoothness—delivering crisp, real-time trend tracking without erratic price oscillations or excessive signal delay.
Standard moving averages (such as SMA, EMA, or WMA) suffer from a fundamental lag-vs-noise dilemma: lengthening the period removes noise but introduces severe lag, while shortening the period reduces lag at the expense of excessive whipsaws. JMA overcomes this limitation by utilizing an adaptive, multi-stage recursive filtering process combined with a dynamic phase-adjustment mechanism. The result is an ultra-smooth, responsive curve that reacts instantly to sharp breakouts and price gaps while remaining stable during choppy, sideways consolidation.
💡 CORE DESIGN PRINCIPLES
🧭 Eliminating the Lag vs. Noise Dilemma
Conventional moving averages lag behind sudden market moves—especially during aggressive gaps or volatility expansions. JMA acts as a near-ideal noise filter: it tracks price action with minimal temporal delay while suppressing high-frequency market noise that leads to false signals.
🎛️ Fine-Tuned Phase & Power Control
Unlike standard averages that offer only a period setting, JMA provides modular fine-tuning controls:
• Phase (-100 to +100): Adjusts the balance between lag reduction and overshoot prevention. Positive values accelerate responsiveness for fast-moving markets, while negative values increase smoothness.
• Power: Controls the acceleration exponent of the smoothing curve, allowing traders to customize how aggressively the filter adapts to price velocity.
🌐 Native Multi-Timeframe (MTF) Capability
Equipped with Pine Script v5 multi-timeframe evaluation engines (timeframe parameter), JMA enables you to seamlessly overlay higher-timeframe trend lines (e.g., Daily or Weekly JMA) onto lower-timeframe execution charts without breaking visual layout or causing repainting.
💡 KEY FEATURES
• Ultra-Low Lag Adaptive Tracking: Captures rapid price breakouts and market gaps instantaneously, giving traders earlier macro directional bias compared to traditional exponential or weighted moving averages.
• Dynamic Trend & Bar Coloring: Includes an optional visual execution engine that dynamically colors both the JMA line and chart price bars based on real-time trend direction (Bullish = Green, Bearish = Red).
• Integrated Alert System: Features pre-configured, non-repainting alertcondition events for bullish and bearish trend flips, enabling instant mobile notifications or webhooks for automated trading workflows.
🔬 MATHEMATICAL ARCHITECTURE
[code]
[STEP 1: Adaptive Coefficient Derivation]
• Beta Coefficient: Beta = (0.45 * (Length - 1)) / (0.45 * (Length - 1) + 2.0)
• Alpha Coefficient: Alpha = Beta ^ Power
• Phase Ratio (PR): Mapped from Phase input (-100 to +100) into range [0.5, 2.5]
[STEP 2: Multi-Stage Recursive Filtering Engine]
• Stage 1 (Raw Smoothing): e0 = (1 - Alpha) * Source + Alpha * e0[1]
• Stage 2 (Trend Detrending): e1 = (Source - e0) * (1 - Beta) + Beta * e1[1]
• Stage 3 (Phase-Adjusted Offset): e2 = (e0 + PR * e1 - JMA[1]) * (1 - Alpha)^2 + Alpha^2 * e2[1]
[STEP 3: Final JMA Value Generation]
• JMA_Current = JMA_Previous + e2
[/code]
🛠️ USAGE FRAMEWORK
1. Trend Bias & Macro Axis
• Green JMA Line / Green Bars: Bullish regime. Focus on long entries, trend continuations, or buying pullbacks toward the JMA line.
• Red JMA Line / Red Bars: Bearish regime. Focus on short entries, trend continuations, or selling relief rallies toward the JMA line.
2. Dynamic Support & Resistance / Trailing Stop
Due to its low-lag and ultra-smooth profile, JMA functions as an exceptional dynamic trailing stop-loss boundary during sustained trend movements, preventing premature exits caused by minor intraday noise.
3. Replacement Proxy for Oscillators
Standard indicators (MACD, RSI, Stochastics) often generate false crossovers when calculated using raw price or EMAs. Passing the smoothed JMA output into these classical formulas yields significantly cleaner, higher-conviction oscillator signals.
⚙️ SYSTEM CHARACTERISTICS
• Zero Repainting: All calculations strictly evaluate on closed historical bar states.
• Fully Parameterized Inputs: Customize source price, length, phase, power, bar coloring, and color themes.
• Asset-Agnostic Engine: Operates with high precision across Equities, Forex, Crypto, Commodities, Futures, and Indices.
• Clean & Modern UI: Designed for high visual clarity on both dark and light chart themes.
📌 CREDIT & ATTRIBUTION
The Jurik Moving Average Approximation script is engineered and published by gunebak4n on TradingView.
This indicator is based on the mathematical concepts of the Jurik Moving Average (JMA) originally conceptualized by Mark Jurik (Jurik Research).
⚠️ DISCLAIMER
This script is an open-source community implementation and mathematical approximation of the JMA concept. It is not affiliated with, officially supported by, or endorsed by Mark Jurik or Jurik Research. This indicator is a technical analysis visualization tool and does not provide financial advice, automated trading signals, or profit guarantees. Always perform thorough backtesting and practice strict risk management.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.