The ema crossover signal indicator refuses most of the crosses it sees. An 8 and 21 pairing crosses often. This build adds a slope check and a range check, so only the crosses with something behind them earn a mark.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 4: EMA Fast, EMA Slow, Strong Buy, Strong Sell |
| Alerts | popup, push notification |
| Inputs | 7 |
The chart output explained
A dodger blue `EMA Fast` line runs at `InpFastPeriod` `8`.
An orange red `EMA Slow` line runs at `InpSlowPeriod` `21`.
`Strong Buy` uses arrow 233 and `Strong Sell` uses 234.
Only qualifying crosses get a mark, so the two lines cross more often than the arrows appear.
- EMA Fast: line, dodger blue, width 2
- EMA Slow: line, orange red, width 2
- Strong Buy: arrow, lime, width 3, arrow code 233
- Strong Sell: arrow, red, width 3, arrow code 234

Behind the plots
The crossing itself
iMA supplies both lines in exponential mode. A buy needs the fast line at or below the slow one on the previous bar and above it now.
Slope has to agree
The code compares the fast line against its own value `InpSlopeBars` `3` bars back. A rising slope backs a buy. A cross where the fast line is still falling gets rejected.
Range has to be present
iATR at `InpAtrPeriod` `14` gets compared against its own average across `InpAtrAvgPeriod` `50` bars. The current reading must reach `InpAtrMult` `0.90` of that average.
What the output means
The word strong in the plot names refers to the two filters, nothing more.
Crosses without an arrow are the ones a filter rejected.
`InpAtrMult` `0.90` sits below one, so it rejects only the deadest conditions.
Both lines lag, so the mark always lands after the turn.
Alert channels in this build: popup and push notification, one message per closed bar.
Two routes ship here. `InpEnableAlerts` arrives true and drives both a terminal popup and a handset push. There is no mail option and no sound option in this build, so those two are the complete set.
Every EMA Crossover Signal Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpFastPeriod |
Fast EMA period. Bars in the fast line, default `8`. | 8 |
InpSlowPeriod |
Slow EMA period. Bars in the slow line, default `21`. | 21 |
InpAtrPeriod |
ATR period. Bars in the range reading, default `14`. | 14 |
InpAtrAvgPeriod |
ATR average for above-average gate. Bars in the baseline that reading gets held against, default `50`. | 50 |
InpAtrMult |
Min ATR / AvgATR ratio for strong cross. Share of that baseline the reading must reach, default `0.90`. | 0.90 |
InpSlopeBars |
Bars to measure slope direction. Bars back the slope comparison reaches, default `3`. | 3 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpEnableAlerts |
Enable popup/push alerts. Terminal and handset messages on a strong cross, default `true`. | on |

Where to point it
An 8 and 21 pairing suits intraday work. EURUSD H1 is the reference chart, where strong crosses arrive a few times a week. On M5 the raw crosses come constantly and the filters do real work. H4 leaves very few.
When it is unreliable
`InpAtrMult` `0.90` is below one, so the range filter is far weaker than its name suggests.
A three-bar slope is short, so it agrees with the cross most of the time.
Two averages crossing is still a lagging event, filters or not.
Copy the compiled EMA Crossover Signal Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Background reading on the method behind the EMA Crossover Signal Indicator: Moving average crossover on Wikipedia, Ice Futures And Spot Prices at StockCharts ChartSchool.
Download the EMA Crossover Signal Indicator for MT4 and MT5
The zip holds the compiled EMA Crossover Signal Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What does InpSlopeBars 3 check?
Whether the fast line is higher or lower than it was three bars ago. A buy needs it rising. Three bars is a short window, so this filter agrees with the cross far more often than it blocks it.
Is InpAtrMult 0.90 a strict filter?
No, and the name oversells it. The current range reading only has to reach ninety percent of its fifty-bar average, which most bars manage easily. Set it above one to demand genuine expansion.
Why does InpAtrAvgPeriod use 50?
It gives a stable picture of normal conditions across roughly two days on an hourly chart. A shorter baseline would adapt to a quiet spell and stop filtering exactly when filtering matters.
What makes a Strong Buy different from a plain cross?
Two extra conditions. The fast line must also be rising over three bars, and the range reading must sit near its fifty-bar average. A cross failing either one leaves the lines crossing with no arrow.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the EMA Crossover Signal Indicator as one input. Always backtest before trading live.
Category: this is part of our Trend collection. Also, browse more Trend for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- For background on this concept, see Moving average crossover on Wikipedia.
- For broader market context, see Ice Futures And Spot Prices at StockCharts ChartSchool.
