TFX V1
This Old Kings expert advisor (trading robot) for MetaTrader 4 is called TFX V1. The file name marks it as version 1. In the code it works with moving averages. It moves the stop behind price, can size trades from your risk and has a news filter. It has 40 settings, for example Start Lot Size (default 0.1), Lot Size Increment (default 0.1) and Long Short Balance (default false). 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 · v1 · Free
About TFX V1
TFX V1 is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average. It moves the stop loss behind price (trailing stop / break-even), can size trades from your balance and risk percent and has a news filter. It has 40 settings, such as Start lot size, Lot size increment and Long short balance. MQL source code included.
It also works on several symbols at once.
Files in the download: TFX v1_8.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 |
|---|---|---|
| Start lot size | 0.1 | starting lot size for cycle |
| Lot size increment | 0.1 | Additional orders will increase by this amount |
| Long short balance | false | will balance long and short order lots + add Balance_Weight if trend changes |
| Balance weight | 0.1 | amount over balanced long and short lot sizes you want to increase by with the trend |
| Choose own progression | false | select true if you want te enter your own progression lot sizes below |
| Trade 1 | 0 | Enter in your own trade progression lot sizes |
| Trade 2 | 0 | |
| Trade 3 | 0 | |
| Trade 4 | 0 | |
| Trade 5 | 0 | |
| Trade 6 | 0 | |
| Trade 7 | 0 | |
| Trade 8 | 0 | |
| Trade 9 | 0 | |
| Trade 10 | 0 | |
| Trade 11 | 0 | |
| Trade 12 | 0 | |
| Trade 13 | 0 | |
| Trade 14 | 0 | |
| Trade 15 | 0 | |
| Trade 16 | 0 | |
| Trade 17 | 0 | |
| Trade 18 | 0 | |
| Trade 19 | 0 | |
| Trade 20 | 0 | |
| Max trades | 100 | maximum number of trades allowed |
| Close all max | false | select true if you want ALL orders to close if Max_Trades is hit |
| Pyramid | true | if true trades with trend, if false trades against trend |
| Auto restart | true | set to true if you want EA to re-start after each cycle |
| Use ma entry | false | select true if you want moving average to decide starting direction |
| Next trade | 20 | next trade pip increment if Use_MA_Entry =true (will trade this many pips above OR below last order) |
| Ma period | 7 | moving average period for calculation |
| Ma timeframe | 60 | timeframe used for MA calculation, 1m=1, 5m=5, 15m=15, 30m=30, 1hr=60, 4hr=240, 1d=1440 |
| Use kayvan method | true | select to use kayvan's method |
| Bar timeframe | 60 | Bar Timeframe used to look back on, 1m=1, 5m=5, 15m=15, 30m=30, 1hr=60, 4hr=240, 1d=1440 |
| Bars look back | 1 | number of bars looked back at from current bar for high and low |
| Entry lag long | 0 | number of pips above high to enter trade |
| Entry lag short | 0 | number of pips below low to enter trade |
| Last entry filter | false | if true next high must be greater than last high, next low less than last low |
| Use trailing stop | true | select true to use a trailing stop based on total $amount |
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 · News Trading · Multi-Currency · Moving Average · MT4 Expert Advisor · MQL4 Source Code