Products or services listed here are not affiliated with or endorsed by Forex-station, unless explicitly stated.

Moving AveragesFree project MA Cross Signal. All averaging algorithms and their interpretation possibilities.

1
Hi everyone.

I'm opening a thread for my MA crossover indicator, Moving Average Cross Signal. It's free and it will stay free — this isn't a commercial product, it's a project I develop together with the people who actually use it.

The thread isn't here for promotion. It's here so questions, bug reports and ideas end up in one place: what's missing, what needs reworking, what behaves differently than expected. Anything reasonable makes it into the next update.

Indicator page: Moving Average Cross Signal on the MQL5 Market
─────────────────────────────────────────────

What it does

Two moving averages, a signal on the crossover. Arrows on the chart and alerts through three channels — terminal alert, push notification to your phone, email. On top of that: line colouring by the selected method, a channel around the averages, and profit displayed on the chart.

The code is fast, no third-party libraries, everything is calculated locally. The indicator can be pulled into your own EA through iCustom with no restrictions.

─────────────────────────────────────────────

Two signal types

This is probably the main reason it was written in the first place. The signal arrives twice:
  1. Preliminary — the crossover condition is already met, but the bar hasn't closed yet and things can still change. Gives you time to get to the terminal, check the news, get ready.
  2. Confirmed — the bar has closed and the arrow is final.
Each type fires exactly once per bar. No duplicates inside a single candle.

─────────────────────────────────────────────

All the averaging algorithms

Twelve entries in the list, fifteen algorithms in practice:
  • SMA — equal weight on every bar of the period.
  • EMA — exponential weighting, reacts faster to the latest bars.
  • SMMA — Wilder's smoothed average, the calmest of the classics.
  • LWMA — linear weights, recent bars count for more.
  • JJMA — Jurik-family smoothing: low lag with heavy noise suppression.
  • JurX — another filter from the same family, smoother and slower to turn.
  • ParMA — parabolic approximation of the price series, follows reversals closely.
  • T3 — Tillson's multi-pass EMA with a curvature coefficient.
  • VIDYA — Chande's adaptive average, driven by CMO volatility.
  • AMA — Kaufman's adaptive average: quick in a trend, slow in a range.
  • ALMA — Gaussian-weighted FIR filter, Sigma 6.0 and Offset 0.85 by default.
  • Digital filter — picks the actual filter by period: FATL (1–39), RFTL (40–44), SATL (45–65), RSTL (above 65).
ALMA went in with the latest update. I checked its output against a reference implementation across several periods — agreement down to 1e-16.

─────────────────────────────────────────────

About repainting

Historical values don't change. On the current bar the average moves until the candle closes, which is a property of any moving average rather than something specific to this indicator. If it bothers you, set Shift = 1: the current bar is excluded from the calculation and the line stops moving entirely.

─────────────────────────────────────────────

Parameters
  • Fast MA Mode — calculation method for the fast average
  • Fast MA — period of the fast average
  • Slow MA Mode — calculation method for the slow average
  • Slow MA — period of the slow average
  • SendEmail — send the signal by email
  • Alert — sound alert in the terminal
  • PushNotification — notification to the mobile terminal
  • PaintArrow — arrows on the chart at the crossover
  • ColorMethod — line colouring mode
  • ModePaintProfit — display profit on the chart
  • Channel Expansion Method — how the distance between the averages is expanded
  • ChannelWidth — amount of expansion: 1.0 is no expansion, 2.0 doubles the channel
─────────────────────────────────────────────

Questions I've already had

Can I use it in my own EA?
Yes, no restrictions. Write it yourself or head to the Freelance section. If the idea is interesting and you're willing to share it with the community, message me — I'll help with the automation.

Which instruments does it work on?
Any of them: forex, crypto, indices, stocks, futures. On volatile instruments it makes sense to force the channel wider; for longer-term work, raise the periods or switch the calculation method.

How do I read the crossovers?
The crossover itself signals a change in the character of the move. From there the options are wide open: averages as support and resistance, entries only when price sits between the lines, the slow average's direction as a trend filter, candlestick patterns only when they touch the line. Open to discussion — that's what the thread is for.

A simple starting setup
SMA 200 as the slow average, EMA 50 as the fast one, cross to the upside plus above-average volume, 1% risk per trade, stop behind the local low, take profit at 2:1. Not a finished system, just a starting point — test it on your own history.

─────────────────────────────────────────────

Where you can help
  • Which smoothing methods are missing? The library is modular, adding a new algorithm is a matter of one class. ALMA showed up because someone asked for it.
  • Run it on your instrument and timeframe. Exotics, crypto and low timeframes are the most interesting — that's where oddities usually surface.
  • Ideas on filters and ways to read the signal. What actually cuts out false crossovers in your experience?
  • Bug reports. Include your terminal build, symbol, timeframe, settings and what exactly went wrong — I'll reproduce it and fix it.
Post in the thread, I read everything.

Re: Free project MA Cross Signal. All averaging algorithms and their interpretation possibilities.

3
boytoy wrote: Wed Aug 19, 2026 4:20 pm If it's not commercial can't the ex4 be posted on this site?? 🤔
This way, it’s more convenient for me to update and monitor the indicator’s development. The indicator is updated very frequently — keeping multiple repositories is not logical.

To avoid violating anything. I posted this in the commercial section just in case. But the indicator is completely free and without any restrictions.

Re: Free project MA Cross Signal. All averaging algorithms and their interpretation possibilities.

4
Update 2.5 — the alert system reworked

Nothing was touched in the averaging algorithms or the crossover logic this time. All of it happened in the alerts, and two of the changes came straight out of reports — so here's what moved and why.

─────────────────────────────────────────────

Each channel now has three states instead of two

The indicator has always produced two events: the preliminary one while the bar is still forming, and the confirmed one after it closes. But the three notification switches were plain on/off flags, so you couldn't route those two events separately. It was both or nothing.

Now every channel — Email, Alert, Push Notification — is a three-state parameter:
  • Off
  • Signal only — fires only after the bar has closed and the arrow is final
  • Signal + preliminary — you also get the early warning while the bar is forming
The setup most people seem to want: push on confirmed crossings only, so the phone stays quiet during the session, while the terminal Alert still shows the early warning on the screen in front of you.

─────────────────────────────────────────────

BUY and SELL no longer block each other

This was a real bug, and it had been sitting there quietly. The "one alert per bar" rule was a single flag on the alert object, and both directions went through the same object — so if a buy signal fired first, a sell signal on the same bar could be swallowed with no trace anywhere.

It's now a small journal keyed by event, storing the bar's open time and the last send time per key. Duplicates inside a candle are still filtered exactly as before, but the two directions no longer compete for one slot. The cooldown between alerts became per-event as well.

─────────────────────────────────────────────

The indicator now tells you when a channel can't work

If email or push is enabled in the settings but not configured in the terminal itself, you get a line in the Experts log instead of just never receiving anything. Going by the messages I get, that was the most common source of "alerts don't work" — and it was never the indicator.

─────────────────────────────────────────────

Sound became a channel of its own

Leave the sound file name empty and audio is muted without touching anything else.

─────────────────────────────────────────────

Your settings survive the update

Saved .set files keep working. Channels that were previously enabled come back as "Signal + preliminary", which is exactly the old behaviour. Nothing to reconfigure, and no channel silently switching itself off.

─────────────────────────────────────────────

What would help

If anything alert-related behaves differently than it did on 2.4 — especially on low timeframes or with several charts running the indicator at once — post it here with your build, symbol and settings. The alert code was rewritten rather than patched, so this is where a regression would show up first.

Still collecting requests for smoothing methods. ALMA went in because someone asked.