Skip to content
Forex Indicator System Thailand
Back to marketplace
TrendEAMedium

Viprasol MA Cross EA

EMA crossover EA with ADX/RSI/session/spread filters, ATR-based SL/TP and a trailing stop

Download this EA for free

Download right away. Nothing to fill in.

Version
2.00
Published
11/21/2026
File size
55 KB

Open source, MIT License, by Viprasol Tech Private Limited. See licences

Version history

  1. 2.00Current11/21/2026 · 55 KB

    First release on this site.

How to use

Install the EA in MetaTrader 5 and drag it onto the chart of the symbol you want, with Algo Trading on. The EA decides on closed bars of SignalTF (PERIOD_CURRENT = chart timeframe), while break-even and trailing run on every tick.

Check the lot sizing mode (MMMode) first: the default is a risk percentage of equity; MM_FIXED_LOT uses FixedLot instead. Set SessionStartHour and SessionEndHour to match your broker's server time. With CloseOutsideSession on, the EA closes any open position outside the session window.

MagicNumber identifies the EA's own orders; if you run several charts of the same symbol, give each a different Magic Number. Test in the Strategy Tester and on a demo account first.

Parameters

NameDefaultDescription
FastPeriod12Period of the fast MA.
SlowPeriod26Period of the slow MA.
MAMethodMODE_EMAMA type (EMA, SMA and so on).
SignalTFPERIOD_CURRENTTimeframe used for the signals and filters (PERIOD_CURRENT = chart timeframe).
MMModeMM_RISK_PCTLot sizing mode: MM_FIXED_LOT (fixed) or MM_RISK_PCT (risk percentage of equity).
FixedLot0.1Lot size when MM_FIXED_LOT is used.
RiskPercent1Risk per order as a percentage of equity when MM_RISK_PCT is used (computed from the SL distance).
MaxLotCap5Upper limit on the lot size the EA opens per order.
ATRPeriod14ATR period used for SL, TP, break-even and trailing.
SL_ATR2Stop-loss distance as a multiple of ATR.
TP_ATR3Take-profit distance as a multiple of ATR.
UseBreakEventrueMove the SL to break-even once profit reaches the trigger.
BE_TriggerATR1Profit, as a multiple of ATR, needed before the SL is moved to break-even.
BE_OffsetPts5Points above the entry (below for a Sell) at which the SL is placed on break-even, locking a small profit.
UseTrailingtrueEnable the ATR trailing stop.
Trail_ATR2Trailing distance from the current price, as a multiple of ATR.
Trail_StepPts10Minimum improvement in points before an SL modification is sent.
UseADXFiltertrueRequire trend strength from ADX.
ADXPeriod14ADX period.
ADXMinLevel20Minimum ADX value that allows entries.
UseRSIFiltertrueRequire the RSI filter.
RSIPeriod14RSI period.
RSIBuyMax70Block Buys if RSI is above this value.
RSISellMin30Block Sells if RSI is below this value.
UseSpreadFiltertrueBlock entries when the spread is too wide.
MaxSpreadPts30Maximum spread, in points, that allows an entry.
UseSessiontrueRestrict entries to a time window and weekdays.
SessionStartHour7Start hour of the entry window (server time).
SessionEndHour20End hour of the window (server time). If it is lower than the start hour the window wraps past midnight.
TradeMondaytrueAllow entries on Monday.
TradeTuesdaytrueAllow entries on Tuesday.
TradeWednesdaytrueAllow entries on Wednesday.
TradeThursdaytrueAllow entries on Thursday.
TradeFridaytrueAllow entries on Friday.
CloseOutsideSessionfalseClose the open position when outside the configured session.
MaxTradesPerDay5Maximum number of new trades per day (server day). 0 means unlimited.
ExitOnOppositeCrosstrueClose the position when the EMAs cross in the opposite direction.
MagicNumber20250101Magic number the EA uses to identify its own orders.
MaxSlippage20Maximum accepted price deviation in points.
ShowDashboardtrueShow the status dashboard on the chart.
PanelTextclrWhiteText colour of the dashboard.
PanelFontSize9Font size of the dashboard.
PanelX12Horizontal offset of the dashboard in pixels.
PanelY22Vertical offset of the dashboard in pixels.

Defaults are the values shipped with the EA, not a recommendation. Results depend on the market and on each account. Past results do not guarantee future results. Trading carries a high risk of loss.

How to install

  1. Download the .ex5 file.
  2. In MT5, choose File > Open Data Folder.
  3. Copy the file into the MQL5\Experts folder.
  4. Right-click Expert Advisors in the Navigator window and choose Refresh (or restart MT5).
  5. Drag it onto a chart, adjust the Inputs, turn on Allow Algo Trading, then click OK.

Description

An EA that opens a trade when a fast EMA (default 12) crosses a slow EMA (26) on SignalTF, reading closed bars. A cross up opens a Buy and a cross down opens a Sell; the MA type can be changed with MAMethod. Entries must first pass the filters: ADX at or above ADXMinLevel (default 20), RSI not above RSIBuyMax for Buys and not below RSISellMin for Sells, spread within MaxSpreadPts, and inside the chosen session and weekdays, which default to Monday-Friday, hours 7-20 server time. Each filter can be turned off.

Every order gets an ATR-based stop-loss and take-profit (default SL 2 ATR, TP 3 ATR). Lot size is fixed or computed from a risk percentage of equity (default 1%), capped by MaxLotCap. After entry the EA moves the SL to break-even once profit reaches 1 ATR and then trails it with an ATR trailing stop; both can be switched off. A trade ends at SL/TP or on an opposite cross (on by default).

It holds one position per symbol at a time (for its Magic Number), limits new trades per day with MaxTradesPerDay (default 5), and shows a status dashboard on the chart.

Banners from the Exness partner programme

Exness banner: gold spreads*

FXIDTH is an independent IB partner of Exness. This channel is not owned or operated by Exness.*Spreads may fluctuate and widen due to factors including market volatility, news events, market open/close, and others.*Processing times may vary depending on the chosen payment method.