Loading…

Divergence Ea

Divergence Ea — a MetaTrader 4 expert advisor (trading robot) kept in the Old Kings collection. Its name points to divergence between price and an oscillator. Its source code uses MACD, RSI, the Stochastic oscillator and moving averages. It places pending orders and can size trades from your risk. It has 40 settings, for example string1 (default Parameters of orders / ), static Lots (default 0.1) and dynamic Lots (default 10.0). 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 Divergence Ea

Divergence Ea is an expert advisor (trading robot) for MetaTrader 4 based on MACD, RSI, Stochastic and Moving Average. It places pending buy/sell stop or limit orders and can size trades from your balance and risk percent. It has 40 settings, such as I string1, I static lots and I dynamic lots. MQL source code included.

Files in the download: mql4\Include\Common\Common_GetSymbolInfo.mqh, mql4\Include\Common\Common_MathUtils.mqh, mql4\Include\Common\Common_Trade.mqh, mql4\Include\Divergence\Divergence_CalculateSignal.mqh, mql4\Include\Divergence\Divergence_CalculateTradeType.mqh, mql4\Experts\Divergence_Expert.mq4, Best Trading Systems.url.

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

Settings

SettingDefaultWhat it does
I string1Parameters of orders / ======================
I static lots0.1Constant volume /
I dynamic lots10.0Dynamic volume, % of balance/ %
I tp to sl ratio2.0Ratio of the TP size to SL / TP SL
I sl offset1Offset for Stop Loss, pts. / Stop Loss, .
I string2Divergence parameters / ============================
I indicator typeWILLIAM_BLAUBase indicator /
I divergence depth20Depth of 2nd ref. point search / 2 .
I bars period18000First calculate period /
I bars period22Second calculate period /
I bars period31Third calculate period /
I ind applied pricePRICE_CLOSEApplied price of indicator /
I ind ma methodMODE_EMAMA calculate method /
I find ext interval10Price ext. to indicator ext. / . . .
I market applied priceMARKET_APPLIED_PRICE_CLOSEApplied price of market /
I custom nameSentiment_LineThe name of indicator /
I custom buffer0Index of data buffer /
I custom param cntPARAM_CNT_3Amount of ind. parameters / -
I custom param113.0Value of the 1st parameter / 1-
I custom param21.0Value of the 2nd parameter / 2-
I custom param30.0Value of the 3rd parameter / 3-
I custom param40.0Value of the 4th parameter / 4-
I custom param50.0Value of the 5th parameter / 5-
I custom param60.0Value of the 6th parameter / 6-
I custom param70.0Value of the 7th parameter / 7-
I custom param80.0Value of the 8th parameter / 8-
I custom param90.0Value of the 9th parameter / 9-
I custom param100.0Value of the 10th parameter / 10-
I custom param110.0Value of the 11th parameter / 11-
I custom param120.0Value of the 12th parameter / 12-
I custom param130.0Value of the 13th parameter / 13-
I custom param140.0Value of the 14th parameter / 14-
I custom param150.0Value of the 15th parameter / 15-
I custom param160.0Value of the 16th parameter / 16-
I custom param170.0Value of the 17th parameter / 17-
I custom param180.0Value of the 18th parameter / 18-
I custom param190.0Value of the 19th parameter / 19-
I custom param200.0Value of the 20th parameter / 20-
I use coincidence chartsOFFThe coincidence of charts /
I exclude overlapsOFFExclude overlaps of lines /

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: Divergence · Pending Orders · Risk & Lot Size · MACD · RSI · Stochastic · Moving Average · MT4 Expert Advisor · MQL4 Source Code

Old Kings — classic MT4 & MT5 collection · PolyMaria