On this page
Two averages, arrows and optional alerts
The program plots a fast and slow moving average on the main price chart. An average smooths past prices but also lags them. A crossover describes a changed relationship between those lines; it does not establish that a new trend will last.
MA Crossover Alert ForexBestRobots 1.06 is a marked Apache 2.0 derivative of EarnForex 1.05. It corrects history, buffer/shift alignment, evaluated-candle arrows and owned-object cleanup. It displays information and can attempt notifications; it does not place trades or manage stops.
Default SMA 25/50 and strict crossings
Defaults are Fast=25 and Slow=50, both SMA of Close with shifts 0/0. SMA(N)=sum(last N prices)/N, including the evaluated candle. EMA, SMMA and LWMA weight history differently; MT5 additionally offers TEMA. Fast/Slow are configured roles: mixing methods can change relative responsiveness. Our independent numerical checks cover SMA and LWMA, not every native initialization.
A strict Fast below Slow on the preceding candle and Fast above Slow on the evaluated candle is labelled BUY. The reverse is SELL. Equality at either reading does not qualify; touching or remaining on one side is insufficient. These are event names, not orders or a complete entry/exit system.
ForexBestRobots gives both platforms an explicit nonnegative-shift contract: at chart candle t, each line uses its average calculated s candles earlier, MA(t−s). Native handle and plot shifts stay zero, so there is no second displacement. Negative shifts are rejected. ForexBestRobots also requires Fast Period < Slow Period on both platforms.
21 functional controls and platform defaults
MT4 has 21 functional inputs and four decorative Comment headings; MT5 has the same controls with four input groups. MODE_SMA and MODE_SMA_ are the corresponding SMA enum names. Use positive ordered periods, nonnegative shifts/scan, arrow size 1–5 and a unique nonempty name per chart instance.
| Input | Default | Practical meaning |
|---|---|---|
IndicatorName | FBR-MACA | Instance name and owned-arrow prefix; use a different name for each copy on one chart. |
MAFastPeriod | 25 | Fast averaging period, default 25; ForexBestRobots requires it below Slow Period. |
MAFastShift | 0 | Nonnegative fast-line shift: reads the average this many candles earlier; default 0. |
MAFastMethod | MODE_SMA (MT4) / MODE_SMA_ (MT5) | Fast method: SMA, EMA, SMMA or LWMA; MT5 also has MODE_TEMA. Native non-SMA initialization is untested. |
MAFastAppliedPrice | PRICE_CLOSE | Fast applied price, Close by default; seven standard price choices. |
MASlowPeriod | 50 | Slow averaging period, default 50 and strictly greater than Fast Period. |
MASlowShift | 0 | Nonnegative slow-line shift, independently aligned; default 0. |
MASlowMethod | MODE_SMA (MT4) / MODE_SMA_ (MT5) | Slow method, chosen independently; TEMA is MT5 only. Illustrations use SMA. |
MASlowAppliedPrice | PRICE_CLOSE | Slow applied price, chosen independently; default Close. |
CandleToCheck | CURRENT_CANDLE | Current evaluates the forming candle; Previous a completed candle. ForexBestRobots arrows mark the evaluated candle. |
BarsToScan | 500 | Scan 500 evaluation positions; ForexBestRobots defines 0 as all available valid history. |
EnableNotify | false | Master notification switch, false by default. |
SendAlert | false | Popup false: enable both this switch and EnableNotify for popup alerts. |
SendApp | false | Push false; requires the master and terminal configuration. |
SendEmail | false | Email false; requires the master and terminal configuration. |
EnableDrawArrows | true | Draw event arrows, true by default; independent of notification delivery. |
ArrowBuy | 241 | Wingdings code for BUY arrows, default 241. |
ArrowSell | 242 | Wingdings code for SELL arrows, default 242. |
ArrowSize | 3 | Arrow size 3; supported range 1–5. |
ArrowBuyColor | clrGreen | BUY-arrow colour; does not change the chart-line colour. |
ArrowSellColor | clrRed | SELL-arrow colour; does not change the chart-line colour. |
Real EUR/USD: a move, repeated crosses and period sensitivity
These original charts use archived Yahoo Finance EURUSD=X H1 OHLC in UTC. We calculated the default Close SMA pair and strict events on completed readings. Windows were selected for visible price movement and crossings, not profitability. Letters are ForexBestRobots annotations, not native arrows, tick replays or executed trades.



Provider OHLC are not identified broker-specific Bid/Ask execution prices. Native history may differ; spreads, fills and returns were not measured. Chart colours are illustrative. Scroll horizontally on narrow screens.
Download the illustrated readings (CSV) · 1Download the illustrated readings (CSV) · 2
All four notification switches start off
EnableNotify=false, SendAlert=false, SendApp=false and SendEmail=false. Enabling the master alone sends nothing. For popups, enable both EnableNotify and SendAlert. Push/email additionally need terminal setup and retain broker company, account name and account number in messages. Downloading activates nothing.
Stored direction suppresses an identical event until a reading without a crossover (SIGNAL_NEUTRAL) or a different direction is processed. Previous also checks new chart-bar time and may initially wait until the next bar after attachment. Current can attempt more than one notification per bar after state changes; it is not the same gate as the Stochastic ForexBestRobots edition.
Current readings and arrows can change before close; a sent notification cannot be recalled. Previous arrows mark the evaluated completed candle. Historical arrows do not each send a message. Only line buffers 0=Fast and 1=Slow exist; no separate 1/−1 event buffer, cooldown, sound-file input or NoWindow option is provided.
Compile and install the matching platform source
Choose MQ4 for desktop MT4 or MQ5 for MT5. These marked derivative ZIPs contain source without ready EX4/EX5.
- Download and extract the ZIP for your platform.
- In MetaTrader: File → Open Data Folder → MQL4 or MQL5.
- Copy Indicators and Files into that directory; MT5 also needs Include. The upstream copy is reference material.
- Open MA_Crossover_FBR.mq4 or MA_Crossover_FBR.mq5 in matching MetaEditor, Compile(F7) and inspect errors.
- Refresh Navigator → Indicators, attach to a demo chart, use a unique IndicatorName and inspect settings, history and Experts/Journal.
ForexBestRobots has not compiled or executed these sources in MetaTrader. Formula, event and index models do not replace native testing of lines, objects, TEMA or notification delivery. Test the compiled indicator on demo first.
Download MA Crossover Alert ForexBestRobots free
Each ZIP contains modified platform source, untouched original reference source, required icon and MT5 includes, full Apache 2.0 license, change log, patch, instructions and SHA-256 checksums. No registration or broker account is required to download.
ForexBestRobots 1.06 identifies the derivative of EarnForex 1.05. Original notices remain and changes are marked. Original source, icons and dependencies match the corresponding official archives byte for byte. Compile the modified source in the matching MetaEditor.
Free source ZIP · ForexBestRobots 1.06 · Compile in MetaEditor
Lag, shifts and verification limits
Averages react to historical prices. In sideways conditions the pair can cross repeatedly; in a sharp move it can respond late. A crossover alone does not define a stop, target or position size, and no profit follows automatically from its BUY/SELL label.
ForexBestRobots bounds full valid windows and adjacent comparisons, uses explicit nonnegative shifts and aligns arrows to evaluated candles. Cleanup affects only the instance arrow prefix. BarsToScan=0 may increase work. Negative shifts and Fast Period ≥ Slow Period are rejected; MT5 TEMA remains a platform-specific option.
Independent SMA/LWMA values and event/index/notification models do not run MQL. They do not certify native EMA/SMMA/TEMA seeds, broker history, chart objects, EA reads, tick paths, execution costs or delivery. Data corrections can also alter historical readings.
Frequently asked questions
Are the defaults EMA 25/50?
No. Both defaults are SMA of Close, shifts 0/0. Change each method explicitly if you want EMA.
Why does enabling EnableNotify send nothing?
Every channel also starts false. For popups, enable SendAlert as well. Push/email need their own switches and terminal configuration.
Can a cross or arrow disappear?
Yes. Current is the default and can change before close. Previous uses a completed candle with its ForexBestRobots arrow on that candle; feed corrections remain possible.
Is TEMA available on both platforms?
No. The retained native MODE_TEMA choice exists only in MT5. ForexBestRobots has not tested native TEMA initialization or runtime.
Are compiled EX4/EX5 included?
No. Compile MQ4/MQ5 in matching MetaEditor. These are marked ForexBestRobots 1.06 sources; native compilation and execution have not been performed by ForexBestRobots.
Sources and review scope
Original code, license and dependencies are pinned to an EarnForex revision. Platform-specific inputs and source changes are recorded separately. Independent SMA/LWMA and event models support the charts, not terminal certification or a strategy performance claim.