Advertisement IC Markets

⚡ The Ultimate Scalper's Tool: Jurik Moving Average (JMA) Explained + MT4/MT5 Code!

Optimize MetaTrader 4, MetaTrader 5, cTrader, and TradingView for speed. Discuss Level II Market Depth (DOM), custom hotkeys, and volume indicators.
PropScalpDesk
Posts: 521
Joined: Sat Sep 19, 2026 7:50 pm

Re: ⚡ The Ultimate Scalper's Tool: Jurik Moving Average (JMA) Explained + MT4/MT5 Code!

Post by PropScalpDesk »

Making location the gate is sensible, and it's close to what I do, just less specific about sweeps. A JMA turn only counts for me if price is within about 5 pips of a level marked before the session: prior day high or low, the Asia range, or an M15 swing. Anything mid-range is ignored, sweep or not.

I'd be careful with "just swept". On EURUSD M1 some M15 fractal gets taken out several times a morning, and afterwards nearly every turn looks like it followed one. I caught myself relabelling ordinary pullbacks as sweeps to justify the JMA signal. A level list written before the open removes that, because the level exists before the turn does.

One practical detail: JMA's phase setting changes how early it turns more than the length does. I keep phase at 0 on M1. Positive values make it overshoot and paint turns that reverse a bar later.
Recommended broker for automated trading & scalping IC Markets
LondonNewsTrader
Posts: 421
Joined: Mon Sep 21, 2026 9:30 am

Re: ⚡ The Ultimate Scalper's Tool: Jurik Moving Average (JMA) Explained + MT4/MT5 Code!

Post by LondonNewsTrader »

PTScalper wrote: If the JMA is too slow to react and doesn't confirm the turn within a few M1 bars, the momentum of the sweep is dead and the state must reset to Neutral.
The expiry is a good idea, but I think the trigger will rarely let it come into play. Last(1) < Last(2) is a one-bar slope, and on M1 even a smooth average dips for a single bar quite often. In most sweeps the JMA will tick down within the first bar or two, so the trade is taken almost immediately and the timeout hardly ever fires. Requiring the slope to hold for two bars, or a minimum size relative to ATR, makes the confirmation mean something.

Two implementation details. _barsSinceSweep needs to be reset to zero when the state moves to LiquiditySweptHigh, otherwise it carries over from the previous setup. And this block has to run in OnBar. If it sits in OnTick, the counter counts ticks, and five ticks can pass in a second during a busy minute.

The state machine design itself is clean, and keeping the sweep detection on M15 with execution on M1 is sensible.
FXS Prop Desk
Posts: 1689
Joined: Wed Oct 07, 2026 9:52 am

Re: ⚡ The Ultimate Scalper's Tool: Jurik Moving Average (JMA) Explained + MT4/MT5 Code!

Post by FXS Prop Desk »

JMA is a good choice for smooth and responsive lines. Note that the original Jurik algorithm is proprietary, so freely available MT4/MT5 versions are approximations, and different implementations can produce noticeably different results. Anyone comparing backtests should check which version they use, as signals on M1 can vary between implementations.

For backtesting, it helps to note the exact source of the code (version, author) in the strategy description, so results can be reproduced later and compared across implementations.
FXS Official Team | The Idea Lab & Strategy
Post Reply