Farhad Hill V22
From the Old Kings archive: Farhad Hill V22, an expert advisor (trading robot) for MetaTrader 4. The file name marks it as version 22. In the code it works with MACD, the Stochastic oscillator and moving averages. It moves the stop behind price, can size trades from your risk and handles several symbols. It has 40 settings, for example Account Is Mini (default false), Money Management (default false) and Trade Size Percent (default 5). Run it in the Strategy Tester and then on a demo account to see how it opens and closes trades. 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 · v22 · Free
About Farhad Hill V22
Farhad Hill V22 is an expert advisor (trading robot) for MetaTrader 4 based on MACD, Stochastic and Moving Average. It moves the stop loss behind price (trailing stop / break-even), can size trades from your balance and risk percent and works on several symbols at once. It has 40 settings, such as Account is mini, Money management and Trade size percent. MQL source code included.
Files in the download: FarhadHill_V22.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 |
|---|---|---|
| Account is mini | false | Change to true if trading mini account |
| Money management | false | Change to false to shutdown money management controls. |
| Trade size percent | 5 | Change to whatever percent of equity you wish to risk. |
| Lots | 1 | you can change the lot but be aware of margin. Its better to trade with 1/4 of your capital. |
| Max lots | 100 | |
| Stop loss | 0 | Maximum pips willing to lose per position. |
| Trailing stop | 15 | Change to whatever number of pips you wish to trail your position with. |
| Use trailing stop | true | Trailing stop distance or switch |
| Trailing stop type | 2 | Type 1 moves stop immediately, Type 2 waits til value of TS is reached |
| First move | 20 | Type 3 first level pip gain |
| Trailing stop1 | 20 | Move Stop to Breakeven |
| Second move | 30 | Type 3 second level pip gain |
| Trailing stop2 | 20 | Move stop to lock is profit |
| Third move | 40 | type 3 third level pip gain |
| Trailing stop3 | 20 | Move stop and trail from there |
| Take profit | 20 | Maximum profit level achieved. recomended no more than 20 |
| Margin cutoff | 300 | Expert will stop trading if equity level decreases to that level. |
| Slippage | 3 | Possible fix for not getting closed Could be higher with some brokers |
| Use macd | true | |
| Macd price | 1 | |
| Use ma cross | false | |
| Ma slow period | 21 | Period or timeframe used by the calculation |
| Ma fast period | 2 | Period or timeframe used by the calculation |
| Ma shift | 1 | Bar shift (0 = current bar) |
| Ma mode | 2 | |
| Ma price | 5 | |
| Use momentum | true | |
| Use psar | true | |
| Momentum period | 14 | Period or timeframe used by the calculation |
| Momentum price | 1 | |
| Momentum high | 100 | |
| Momentum low | 100 | |
| Use stoch level | true | |
| Stoch mode | 0 | |
| Stoch price | 0 | 0, 1 |
| Stoch high | 60 | |
| Stoch low | 35 | |
| Use stoch cross | false | |
| Signal candle | 0 | |
| Signal time frame | 0 | Period or timeframe used by the calculation |
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: Trailing Stop & Break-even · Risk & Lot Size · Multi-Currency · MACD · Stochastic · Moving Average · MT4 Expert Advisor · MQL4 Source Code