Two Levels EA
From the Old Kings archive: Two Levels EA, an expert advisor (trading robot) for MetaTrader 4. It raises the lot size after losses (martingale — high risk), can hold buy and sell positions together and places pending orders. It has 40 settings, for example S1 (default ---------------- Entry S), Distance (default 20) and Use Time Out (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 and 1 settings file (.set). 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 Two Levels EA
Two Levels EA is an expert advisor (trading robot) for MetaTrader 4. It increases the lot size after a losing trade (martingale), can hold buy and sell positions at the same time (hedging) and places pending buy/sell stop or limit orders. It has 40 settings, such as S1, Distance and Use time out. MQL source code included.
It also moves the stop loss behind price (trailing stop / break-even) and can size trades from your balance and risk percent.
Files in the download: StrategyTester Two Levels EA EU M15.gif, StrategyTester Two Levels EA EU M15.zip, two levels ea eu m15.set, Two Levels EA.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 |
|---|---|---|
| S1 | ---------------- Entry Settings | |
| Distance | 20 | Distance between orders |
| Use time out | false | |
| Minutes time out | 1 | |------------------minutes |
| S2 | ---------------- Money Management | |
| Lots | 0.1 | |-----------------------lots size |
| Risk mm | false | |---------------------risk management |
| Risk percent | 1 | |------------------risk percentage |
| Martingale | false | |-----------------martingale |
| Multiplier | 2.0 | |-----------------multiplier martingale |
| Min lots | 0.01 | |-------------------minlots |
| Max lots | 100 | |--------------------maxlots |
| Basket profit loss | false | |-----------use basket loss/profit |
| Basket profit | 100000 | |---------------if equity reaches this level, close trades |
| Basket loss | 9999 | |-------------------if equity reaches this negative level, close trades |
| S3 | ---------------- Order Management | |
| Max trade per bar | 1 | |
| Stop loss | 0 | |------------------------stop loss |
| Take profit | 0 | |----------------------take profit |
| Hide sl | false | |---------------------hide stop loss |
| Hide tp | false | |---------------------hide take profit |
| Trailing profit | 0 | |------------------trailing stop after profit reached |
| Trailing stop | 0 | |--------------------trailing stop |
| Trailing step | 0 | |--------------------trailing step |
| Break even | 0 | |-----------------------break even |
| Max orders | 1 | |-----------------------maximum orders allowed |
| Slippage | 3 | |------------------------slippage |
| Magic | 2009 | |------------------------magic number |
| S4 | ---------------- MA Filter | |
| Ma filter | false | |-------------------moving average filter |
| Ma period | 20 | |-----------------------ma filter period |
| Ma method | 0 | |------------------------ma filter method |
| Ma price | 0 | |-------------------------ma filter price |
| S5 | ---------------- Time Filter | |
| Trade on sunday | true | |---------------time filter on sunday |
| Monday to thursday time filter | false | |-time filter the week |
| Monday to thursday start hour | 0 | |-------start hour time filter the week |
| Monday to thursday end hour | 24 | |--------end hour time filter the week |
| Friday time filter | false | |-----------time filter on friday |
| Friday start hour | 0 | |-----------------start hour time filter on friday |
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: Martingale · Hedging · Pending Orders · Trailing Stop & Break-even · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code