Trend Follower
From the Old Kings archive: Trend Follower, an expert advisor (trading robot) for MetaTrader 4. Judging by its name, it is built around following the trend. In the code it works with MACD. It moves the stop behind price, has a trading-hours filter and can size trades from your risk. It has 40 settings, for example Faster EMA (default 4), Slower EMA (default 8) and Sound ON (default true). Watch it on a demo account for a while — robots can behave differently with each broker. Inside: 22 indicator files with source code (.mq4) you can open and edit in MetaEditor and a PDF guide. 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 Trend Follower
Trend Follower is an expert advisor (trading robot) for MetaTrader 4 based on MACD. It moves the stop loss behind price (trailing stop / break-even), trades only in the hours you set (time filter) and can size trades from your balance and risk percent. It has 40 settings, such as Faster ema, Slower ema and Sound on. MQL source code included.
It also works on several symbols at once and is set up for gold (XAUUSD).
Files in the download: EMA Crossover Signal.mq4, Fibonacci Pivots.mq4, Laguerre.mq4, Pivot Points Multitimeframe.mq4, RainbowMMA_01.mq4, RainbowMMA_02.mq4, RainbowMMA_03.mq4, RainbowMMA_04.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 |
|---|---|---|
| Faster ema | 4 | |
| Slower ema | 8 | |
| Sound on | true | Turn this alert on or off |
| Gamma | 0.66 | |
| Count bars | 950 | |
| Midpivots | false | |
| Fhr | false | |
| Daily | true | |
| Weekly | true | |
| Monthly | true | |
| Period1 | PERIOD_D1 | Number of bars in the calculation |
| Period | 80 | Period or timeframe used by the calculation |
| Method | 3 | MODE_SMA |
| Price | 0 | PRICE_CLOSE |
| Alert on | true | Turn this alert on or off |
| Email on | false | Turn this alert on or off |
| Trade on | true | |
| TM | Trade and Account managment | |
| Account is micro | False | |
| MM | false | Use Money Management or not |
| Risk | 2 | Percentage of account balance |
| Lots | 1 | Lot size |
| Decrease factor | 0 | |
| Take profit | 60 | Take profit distance |
| Stop loss | 30 | Stop loss distance |
| Only trail after profit | false | Trailing Stop will only trail when order is profitable |
| Trailing stop | 15 | Trailing stop distance or switch |
| Break even | 15 | Pips to move stoploss to breakeven at |
| Pips to lock | 1 | When Breakeven after pips is reached, it will move to that plus this many pips |
| Time parameters | EA Active Time | |
| Use hour trade | false | |
| Start hour1 | 10 | Hour when trading starts (server time) |
| End hour1 | 11 | Hour when trading stops (server time) |
| Start hour2 | 14 | Hour when trading starts (server time) |
| End hour2 | 18 | Hour when trading stops (server time) |
| IS | Indicator Settings | |
| SDL | Slope Direction Line settings | |
| Use slope | False | |
| Sdl period | 80 | Period or timeframe used by the calculation |
| MA | Moving average cross settings |
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: Trend · Trailing Stop & Break-even · Time Filter · Risk & Lot Size · Multi-Currency · Gold (XAUUSD) · MACD · MT4 Indicator · MQL4 Source Code