Jurik Moving Average (JMA) Surrogate [everget]

Lebih penunjuk ekslusif dari everget
Subscribe to Trading Toolkit for $5.00/month to get exclusive indicators by this author. You pay right on TradingView and can use them on your charts straight away.
Terokai Trading ToolkitHello friends!
JMA Surrogate is a compact, open-source approximation of the Jurik Moving Average. It keeps the three-stage smoothing structure and the Phase control of JMA, but replaces JMA's adaptive speed with a fixed one that you set yourself. The result is a lightweight single-file script with nothing to import and every line readable.
🛠️ How It Works
The real JMA measures, on every bar, how unusual the latest price jump is compared with recent noise, and raises its speed when the jump is large. That is what lets it glide through chop and still catch up with a gap within a few bars. This script runs the same final smoothing stages, but the exponent that sets their speed comes from the "Power" input instead of from live volatility.
"Highlight Direction" colors the line by its slope. "Apply Bar Colors" (on by default) and "Apply Background Colors" (off by default) paint the chart green or red by the same slope. The three alerts follow the slope itself, so they work whether the coloring is on or off. For alerts only on closed bars, choose "Once Per Bar Close" in the alert dialog.
If you want JMA's adaptive gap-tracking itself, use the companion "Jurik Moving Average (JMA) [everget]" script, which runs Mark Jurik's original algorithm.
📊 See It In Action
👋 Good luck and happy trading!
JMA Surrogate is a compact, open-source approximation of the Jurik Moving Average. It keeps the three-stage smoothing structure and the Phase control of JMA, but replaces JMA's adaptive speed with a fixed one that you set yourself. The result is a lightweight single-file script with nothing to import and every line readable.
🛠️ How It Works
The real JMA measures, on every bar, how unusual the latest price jump is compared with recent noise, and raises its speed when the jump is large. That is what lets it glide through chop and still catch up with a gap within a few bars. This script runs the same final smoothing stages, but the exponent that sets their speed comes from the "Power" input instead of from live volatility.
- Length sets how much smoothing is applied, as in JMA. Small values follow price closely, large ones give a flatter, slower line.
- Phase (-100 to +100) is the same lag/overshoot control as in JMA. Toward +100 the line commits to moves earlier but overshoots more after large price jumps; toward -100 it waits longer but overshoots less.
- Power replaces JMA's adaptive speed with a fixed one and takes whole numbers. JMA's own speed exponent moves between 1 in calm markets and a ceiling that rises with Length: about 2.8 at Length 7 and 4.7 at Length 80. Power 1 therefore matches JMA's smoothest speed, and higher values make the line faster and closer to price, as if the market were permanently volatile. The default of 2 sits inside JMA's range: a little faster than JMA in quiet markets, a little slower right after a gap.
"Highlight Direction" colors the line by its slope. "Apply Bar Colors" (on by default) and "Apply Background Colors" (off by default) paint the chart green or red by the same slope. The three alerts follow the slope itself, so they work whether the coloring is on or off. For alerts only on closed bars, choose "Once Per Bar Close" in the alert dialog.
If you want JMA's adaptive gap-tracking itself, use the companion "Jurik Moving Average (JMA) [everget]" script, which runs Mark Jurik's original algorithm.
📊 See It In Action
- Power sweep - Add this script three times with Length 14 and Power 1, 2 and 4. Length 14 rather than the default 7 spreads the lines apart: at 7, Power 4 follows price almost bar for bar. Power 1 draws the smoothest, slowest line, the speed JMA uses in calm markets; Power 4 hugs price with visibly more bar-to-bar jitter, already beyond the fastest speed JMA reaches at this Length.
- Surrogate vs JMA - On an instrument with a clear gap, plot this script with Power 1 next to the "Jurik Moving Average (JMA) [everget]" script, both with Length 7 and Phase 50 (this script defaults to Phase 100). Power 1 is the speed JMA uses in calm markets, and the two lines run close together in ordinary price action. At the gap, JMA speeds up and reaches the new level first, which is exactly what the surrogate cannot do.
- The lag/overshoot trade-off - Add this script twice with Length 30, one with Phase +100 and one with Phase -100, and compare how early each turns at swings and how far each overshoots after large moves.
- Open-source, self-contained approximation of the Jurik Moving Average
- Length, Phase and Power controls, with Power setting the speed by hand
- Direction coloring for the line, price bars and chart background
- "Bullish Color Change", "Bearish Color Change" and "Any Color Change" alerts
- How close is this to the real JMA? Its smoothing stages and Phase match JMA's, so with a well-chosen Power it follows JMA closely most of the time. What it lacks is JMA's volatility measurement, so it cannot speed up by itself when price gaps.
- Does it repaint? No. Each value uses only the current bar and earlier ones, so values on closed bars never change. As with any indicator, the value on the still-forming bar updates with every tick until the bar closes.
- Does it predict price? No. Like JMA, it is a smoothing filter, not a forecast.
👋 Good luck and happy trading!
👨🏻💻 Coding services -> Telegram: @alex_everget
🆓 List of my FREE indicators: bit.ly/2S7EPuN
Claim your $20 bonus just for joining Bybit!
bybit.com/invite?ref=56ZLQ0Z
🆓 List of my FREE indicators: bit.ly/2S7EPuN
Claim your $20 bonus just for joining Bybit!
bybit.com/invite?ref=56ZLQ0Z
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
👨🏻💻 Coding services -> Telegram: @alex_everget
🆓 List of my FREE indicators: bit.ly/2S7EPuN
Claim your $20 bonus just for joining Bybit!
bybit.com/invite?ref=56ZLQ0Z
🆓 List of my FREE indicators: bit.ly/2S7EPuN
Claim your $20 bonus just for joining Bybit!
bybit.com/invite?ref=56ZLQ0Z
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.