MACD Pattern
From the Old Kings archive: MACD Pattern, an expert advisor (trading robot) for MetaTrader 4. As the name suggests, the idea behind it is MACD (moving average convergence / divergence) and candlestick patterns. In the code it works with MACD. 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 minstoploss (default 15), m Lots (default 0.1) and p1 (default 1(A)). Run it in the Strategy Tester and then on a demo account to see how it opens and closes trades. Inside: 4 EA files 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 MACD Pattern
MACD Pattern is an expert advisor (trading robot) for MetaTrader 4 based on MACD. 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 Minstoploss, M lots and P1. MQL source code included.
It also can size trades from your balance and risk percent and has a news filter.
Files in the download: MACD_Pattern.mq4, AmazingEA.mq4, HAN.mq4, HAN_Z-Score.mq4.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Minstoploss | 15 | Stop loss distance |
| M lots | 0.1 | |
| P1 | 1(A) | |
| P1enable | true | |
| Stoplossbars1 | 22 | Stop loss distance |
| Takeprofitbars1 | 32 | Take profit distance |
| Otstup1 | 40 | |
| Lowema1 | 13 | |
| Fastema1 | 24 | |
| Maxur1 | 0.0095 | |
| Minur1 | -0.0045 | |
| P2 | 2(B) | |
| P2enable | true | |
| Stoplossbars2 | 2 | Stop loss distance |
| Takeprofitbars2 | 2 | Take profit distance |
| Otstup2 | 50 | |
| Lowema2 | 7 | |
| Fastema2 | 17 | |
| Maxur2 | 0.0045 | |
| Minur2 | -0.0035 | |
| P3 | 3(C) | |
| P3enable | true | |
| Stoplossbars3 | 8 | Stop loss distance |
| Takeprofitbars3 | 12 | Take profit distance |
| Otstup3 | 2 | |
| Lowema3 | 2 | |
| Fastema3 | 32 | |
| Maxur3 | 0.0015 | |
| Maxur13 | 0.004 | |
| Minur3 | -0.005 | |
| Minur13 | -0.0005 | |
| P4 | 4(D) | |
| P4enable | true | |
| Stoplossbars4 | 10 | Stop loss distance |
| Takeprofitbars4 | 32 | Take profit distance |
| Otstup4 | 45 | |
| Lowema4 | 9 | |
| Fastema4 | 4 | |
| Sum bars bup4 | 10 | |
| Maxur4 | 0.0165 |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
- Test it first on a demo account or in the Strategy Tester.
Tags: MACD · Martingale · Pending Orders · Trailing Stop & Break-even · Risk & Lot Size · News Trading · MT4 Expert Advisor · MQL4 Source Code