Mt4 Scripts
This Old Kings expert advisor (trading robot) for MetaTrader 4 is called Mt4 Scripts. In the code it works with moving averages. It raises the lot size after losses (martingale — high risk), places pending orders and can size trades from your risk. It has 40 settings, for example period slow (default 70), period fast (default 25) and period absalut (default 1440). Run it in the Strategy Tester and then on a demo account to see how it opens and closes trades. Inside: 151 EA files 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 Mt4 Scripts
Mt4 Scripts is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average. It increases the lot size after a losing trade (martingale), places pending buy/sell stop or limit orders and can size trades from your balance and risk percent. It has 40 settings, such as Period slow, Period fast and Period absalut. MQL source code included.
Files in the download: accountdetails.mq4, AllAmplitude.mq4, AllMarketData.mq4, analizBara.mq4, ap_1.01.mq4, Average Volatility script for MetaTrader 4.mq4, A_DeleteAllPending.mq4, BasketChartCreator.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 |
|---|---|---|
| Period slow | 70 | Number of bars in the calculation |
| Period fast | 25 | Number of bars in the calculation |
| Period absalut | 1440 | Number of bars in the calculation |
| Shift min1 | 1 | Bar shift (0 = current bar) |
| Shift max1 | 240 | 6-8 |
| Shift min2 | 1 | Bar shift (0 = current bar) |
| Shift max2 | 1440 | Bar shift (0 = current bar) |
| Sleep | 5000 | |
| Clr hight | clrBlue | |
| Clr low | clrRed | |
| Clr med | clrGold | |
| Name hight | HLine | |
| Name low | LLine | |
| Name medium | MLine | |
| Name trend | TrendLine | |
| Name fibo | TrendFibo | |
| Name hight l | Year Hight Line | |
| Name low l | Year Low Line | |
| Name medium l | Year Medium Line | |
| Name medium y | Median Year | |
| Begin date calc | D'2001.01.01' | Hour when trading starts (server time) |
| End date calc | D'2005.09.30' | |
| Basket name | #COM# | Basket Chart Name |
| Pairs | AUDUSD,NZDUSD,USDCAD,EURAUD,EURNZD,EURCA | Basket Pairs (comma seperated) |
| Pairs dw | +1 , +1 , -1 , -1 , -1 , -1 | Directional Weights (comma seperated) |
| Template name | 0 | Template to load on basket chart, "0" to disable |
| Trade direction | 0 | Trade direction |
| Bo investment | 10 | Investment size |
| Bo expiry | 1 | Expiration in minutes |
| N bars | 50 | |
| Timeframe | PERIOD_W1 | Period or timeframe used by the calculation |
| Chart property value | None | Zoom Level |
| Change by partial name | ||
| Use old color | false | Colour on the chart |
| Old color | Blue | Colour on the chart |
| New color | Aqua | Colour on the chart |
| Vertical line | false | |
| Horisontal line | false | |
| Trend line | false | |
| Trendbyangle line | false |
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 · Pending Orders · Risk & Lot Size · Moving Average · MT4 Expert Advisor · MQL4 Source Code