Attachments forums

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

FastInvest, Wed Aug 19, 2026 4:05 pm

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.
All files in topic