KAMA EA
This Old Kings expert advisor (trading robot) for MetaTrader 4 is called KAMA EA. As the name suggests, the idea behind it is Kaufman's adaptive moving average (efficiency ratio). It raises the lot size after losses (martingale — high risk), works with a grid of orders and places pending orders. It has 40 settings, for example Length (default 20), General Section and General Section Desc (default https://github.com/sibvi). Watch it on a demo account for a while — robots can behave differently with each broker. 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.0 · Free
About KAMA EA
KAMA EA is an expert advisor (trading robot) for MetaTrader 4. It increases the lot size after a losing trade (martingale), opens a grid of orders at fixed price steps and places pending buy/sell stop or limit orders. It has 40 settings, such as Length, General section and General section desc. MQL source code included.
It also moves the stop loss behind price (trailing stop / break-even), can size trades from your balance and risk percent and has a news filter.
Files in the download: KAMA_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 |
|---|---|---|
| Length | 20 | KAMA length |
| General section | == General == | |
| General section desc | https://github.com/sibvic/mq4-templates/ | Description of parameters could be found at |
| Ecn broker | false | ECN Broker? |
| Entry logic | TradingModeLive | Entry logic |
| Exit logic | TradingModeLive | Exit logic |
| Lots value | 0.1 | Position size |
| Lots type | PositionSizeContract | Position size type |
| Slippage points | 3 | Slippage, points |
| Trading side | BothSides | What trades should be taken |
| Logic direction | DirectLogic | Logic type |
| Close on opposite | true | Close on opposite signal |
| Cap section | == Position cap == | |
| Position cap | false | Position Cap |
| No of positions | 1 | Max # of buy+sell positions |
| No of buy position | 1 | Max # of buy positions |
| No of sell position | 1 | Max # of sell positions |
| Martingale section | == Martingale type == | |
| Martingale type | MartingaleDoNotUse | Martingale type |
| Martingale lot sizing type | MartingaleLotSizingNo | Martingale lot sizing type |
| Martingale lot value | 1.5 | Matringale lot sizing value |
| Martingale step type | MartingaleStepSizePercent | Step unit |
| Martingale step | 5 | Open matringale position step |
| Net stop loss type | StopLimitDoNotUse | Net stop loss type |
| Net stop loss value | 10 | Net stop loss value |
| Take profit atr multiplicator | 1 | Take profit multiplicator (for ATR TP) |
| Net take profit type | StopLimitDoNotUse | Net take profit type |
| Net take profit value | 10 | Net take profit value |
| Other section | == Other == | |
| Magic number | 42 | Magic number |
| Start time | 000000 | Start time in hhmmss format |
| Stop time | 000000 | Stop time in hhmmss format |
| Mandatory closing | false | Mandatory closing for non-trading time |
| Use weekly timing | false | Weekly time |
| Week start day | DayOfWeekSunday | Start day |
| Week start time | 000000 | Start time in hhmmss format |
| Week stop day | DayOfWeekSaturday | Stop day |
| Week stop time | 235959 | Stop time in hhmmss format |
| Print log | false | Print decisions into the log (On bar close only!) |
| Alerts section | == Alerts == |
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 · Grid · Pending Orders · Trailing Stop & Break-even · Risk & Lot Size · News Trading · MT4 Expert Advisor · MQL4 Source Code