Loading…

2ma Crossover EA

2ma Crossover EA is an expert advisor (trading robot) for MetaTrader 4 from the Old Kings collection. Its source code uses moving averages and ATR. It raises the lot size after losses (martingale — high risk), places pending orders and moves the stop behind price. It has 40 settings, for example Send Long Trades (default TRUE), Send Short Trades (default TRUE) and Signal Candle (default 1). Before any live use, test it on a demo account and check its lot size, stop loss and trading hours. Inside: 1 EA file with source code (.mq4) you can open and edit in MetaEditor. Old Kings are classic community tools shared as-is. Not tested by PolyMaria. Try it on a demo account first. Are you the author of this tool? Message us on Telegram (@abumarket_support) and we will credit you or take it down.

Expert advisor · MT4 · v1.0 · Free

About 2ma Crossover EA

2ma Crossover EA is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average and ATR. It increases the lot size after a losing trade (martingale), places pending buy/sell stop or limit orders and moves the stop loss behind price (trailing stop / break-even). It has 40 settings, such as Send long trades, Send short trades and Signal candle. MQL source code included.

It also trades only in the hours you set (time filter).

Files in the download: 2ma crossover EA.mq4.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Send long tradesTRUE
Send short tradesTRUE
Signal candle1
Ma1period1321;
Ma1shift0Bar shift (0 = current bar)
Ma1methodMODE_LWMA
Ma1pricePRICE_CLOSE
Ma2period2155;
Ma2shift0Bar shift (0 = current bar)
Ma2methodMODE_EMA
Ma2pricePRICE_CLOSE
Close on opposite signalTRUE
Min bars between trades of same type3
MasfhiPrice/Ma filter:
Use single ma filterFALSE
Single ma period5555;
Single ma shift33;
Single ma methodMODE_EMAMODE_EMA;
Single ma pricePRICE_MEDIANPRICE_MEDIAN;
Lots1.0Trade size in lots
Magic number123450:manual trades
Order comment2ma crossover EAComment written on the orders
Slippage5Maximum slippage allowed when opening a trade
S lpips90.0Stop loss distance
T ppips500.0Take profit distance
Atrhi--ATR for TP/SL--
Use atr for slTRUE
Use atr for tpfalse
Atr period14Period or timeframe used by the calculation
Atr time frame0Period or timeframe used by the calculation
Atr multiplier3.5How much the lot size grows after a loss
Behi----------------------------------------
BE----BreakEven settings----
Break evenTRUEMove the stop to break-even
Break even pips20Move the stop to break-even
Break even profit5Move the stop to break-even
Hide break even stopFALSEMove the stop to break-even
Pips away from visual be50
Sep1----------------------------------------
JSL----JumpingStopLoss settings----

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Martingale · Pending Orders · Trailing Stop & Break-even · Time Filter · Moving Average · ATR · MT4 Expert Advisor · MQL4 Source Code

Old Kings — classic MT4 & MT5 collection · PolyMaria