⚡ The Ultimate Scalper's Tool: Jurik Moving Average (JMA) Explained + MT4/MT5 Code!
Posted: Thu Aug 20, 2026 11:47 am
Hi scalpers,
If you’ve been scalping the lower timeframes for a while, you already know the daily struggle: standard moving averages either lag too much (making you late to the breakout) or they react too fast (faking you out during minor pullbacks).
While the Hull Moving Average (HMA) is fantastic, many advanced scalpers eventually graduate to the Jurik Moving Average (JMA). Let's break down why this tool is a favorite for fast-paced trading.
What is the Jurik Moving Average (JMA)?
Developed by Mark Jurik for institutional traders, the JMA was engineered to do two things perfectly: eliminate lag and aggressively smooth out market noise.
A quick dose of honesty: The true, original JMA formula is a heavily guarded, proprietary commercial product. Because of this, the versions used by retail traders on MT4 and MT5 are community-built mathematical approximations. However, these open-source versions are incredibly accurate and still outperform standard moving averages in responsiveness!
Why Scalpers Prefer the JMA
1.) Zero Overshoot: Fast moving averages often "overshoot" or distort during sudden price spikes. The JMA tightly hugs the price action without swinging wildly out of proportion.
2.) Supreme Smoothness: It filters out the tiny, irrelevant 1-pip jitters (market noise) that trigger false entries on the M1 and M5 charts.
3.) Volatility Adaptive: The math behind the JMA adjusts dynamically. When the market moves fast, the line catches up instantly; when the market ranges, it flattens out smoothly.
How to Trade It
As a newbie, do not overcomplicate your charts. Use the JMA as a high-tier directional filter:
1.) Trend Confirmation: Only take long scalps when the price is clearly closing above an upward-sloping JMA. Take shorts when the price is below a downward-sloping JMA.
2.) The JMA Crossover: Plot a "Fast" JMA (e.g., 7-period) and a "Slow" JMA (e.g., 21-period). When the fast crosses the slow, it signals a highly filtered shift in short-term momentum.
3.) Flat Lines = Ranging: When the JMA flattens, it means the market is consolidating. Stay out and wait for a clear angle!
MT4 (MQL4) Version:
Save this as a new Custom Indicator in your MetaEditor (F4).
If you’ve been scalping the lower timeframes for a while, you already know the daily struggle: standard moving averages either lag too much (making you late to the breakout) or they react too fast (faking you out during minor pullbacks).
While the Hull Moving Average (HMA) is fantastic, many advanced scalpers eventually graduate to the Jurik Moving Average (JMA). Let's break down why this tool is a favorite for fast-paced trading.
What is the Jurik Moving Average (JMA)?
Developed by Mark Jurik for institutional traders, the JMA was engineered to do two things perfectly: eliminate lag and aggressively smooth out market noise.
A quick dose of honesty: The true, original JMA formula is a heavily guarded, proprietary commercial product. Because of this, the versions used by retail traders on MT4 and MT5 are community-built mathematical approximations. However, these open-source versions are incredibly accurate and still outperform standard moving averages in responsiveness!
Why Scalpers Prefer the JMA
1.) Zero Overshoot: Fast moving averages often "overshoot" or distort during sudden price spikes. The JMA tightly hugs the price action without swinging wildly out of proportion.
2.) Supreme Smoothness: It filters out the tiny, irrelevant 1-pip jitters (market noise) that trigger false entries on the M1 and M5 charts.
3.) Volatility Adaptive: The math behind the JMA adjusts dynamically. When the market moves fast, the line catches up instantly; when the market ranges, it flattens out smoothly.
How to Trade It
As a newbie, do not overcomplicate your charts. Use the JMA as a high-tier directional filter:
1.) Trend Confirmation: Only take long scalps when the price is clearly closing above an upward-sloping JMA. Take shorts when the price is below a downward-sloping JMA.
2.) The JMA Crossover: Plot a "Fast" JMA (e.g., 7-period) and a "Slow" JMA (e.g., 21-period). When the fast crosses the slow, it signals a highly filtered shift in short-term momentum.
3.) Flat Lines = Ranging: When the JMA flattens, it means the market is consolidating. Stay out and wait for a clear angle!
MT4 (MQL4) Version:
Save this as a new Custom Indicator in your MetaEditor (F4).
Code: Select all
//+------------------------------------------------------------------+
//| JMA_Proxy.mq4 |
//| Open-Source Jurik Approximation for MT4 |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 clrMagenta
#property indicator_width1 2
input int Length = 14; // Smoothing Period
input int Phase = 50; // Phase (-100 to +100)
double JMABuffer[];
double e1[], e2[], e3[], e4[], e5[], e6[];
int OnInit() {
SetIndexBuffer(0, JMABuffer);
SetIndexStyle(0, DRAW_LINE);
// Hidden buffers for math
ArrayResize(e1, Bars); ArrayResize(e2, Bars);
ArrayResize(e3, Bars); ArrayResize(e4, Bars);
ArrayResize(e5, Bars); ArrayResize(e6, Bars);
return(INIT_SUCCEEDED);
}
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[],
const double &open[], const double &high[], const double &low[],
const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) {
int limit = rates_total - prev_calculated;
if(prev_calculated == 0) limit = rates_total - 1;
double pr = Phase;
if(pr < -100) pr = -100;
if(pr > 100) pr = 100;
double phaseRatio = (pr / 100.0) + 1.5;
double beta = 0.45 * (rates_total - 1) / (0.9999999 * rates_total + 2.0);
double alpha = MathPow(beta, phaseRatio);
for(int i = limit; i >= 0; i--) {
double price = close[i];
if(i == rates_total - 1) {
e1[i] = price; e2[i] = price; e3[i] = price;
e4[i] = price; e5[i] = price; e6[i] = price;
JMABuffer[i] = price;
continue;
}
// JMA proxy smoothing logic
e1[i] = (1 - alpha) * price + alpha * e1[i+1];
e2[i] = (price - e1[i]) * (1 - beta) + beta * e2[i+1];
e3[i] = e1[i] + e2[i];
e4[i] = (1 - alpha) * e3[i] + alpha * e4[i+1];
e5[i] = (e3[i] - e4[i]) * (1 - beta) + beta * e5[i+1];
e6[i] = e4[i] + e5[i];
JMABuffer[i] = e6[i];
}
return(rates_total);
}