Catalogue Capstone Portfolio EA
This is the closing project of a large catalogue, and it would be easy to claim it demonstrates everything in the collection. It does not, and this description says so plainly rather than inflating the number. What it actually integrates, correctly and working, is eight techniques: a fast/slow EMA cross filtered by a minimum ATR so a cross is only trusted as a real trend when there is enough genuine range behind it; ATR-based position sizing, where the stop distance is a multiple of current ATR and the lot size is derived from account equity and a risk percent divided by that stop, never a fixed lot; the ticket-collect-then-act pattern from this catalogue's own house style, gathering this EA's own-magic tickets into an array before acting on any of them rather than selecting and acting inside one forward-scanning loop; a magic-scoped floating-loss circuit breaker independent of any per-trade stop; a self-computed daily loss guard using this EA's own closed-trade history, so it is correct even when nothing else is attached; an optional check of the TRK_ KillState GlobalVariable published by Terminal Risk Kernel, honoured only if that EA happens to be attached elsewhere on the terminal - genuinely optional, since a CodeBase submission must stand alone and cannot require a second download; a spread and non-positive-price sanity guard before every order; and pip-aware stop and target placement with a break-even step once price has moved a configurable number of ATRs in profit. What this project deliberately does NOT attempt: it is not a signal copier (see Risk Remapping Copier, Consensus Copier), it does not read or execute a text rule file (see Declarative Rule Runner), it trades one symbol only rather than a multi-symbol basket, it has no persistence beyond the GlobalVariables it optionally reads, and it does not itself publish a risk kernel's worth of GlobalVariables for other EAs to consume - it is a consumer of that convention, not a second publisher of it. A downloader expecting a twenty-technique showcase will not find one here; what they will find is eight techniques that actually work together and are individually explained, which is the more honest and more useful thing to publish. Notes and limitations - Single-symbol only - the chart it is attached to. It does not manage a portfolio or basket across multiple symbols. - The external kill-switch check is genuinely optional and gracefully degrades: GlobalVariableCheck() confirms the variable exists before reading it, so a terminal without Terminal Risk Kernel attached behaves exactly as if that input were false. - The daily loss guard only counts this EA's own magic number's closed trades on its own symbol - it is not an account-wide guarantee. Pair it with Terminal Risk Kernel or Daily Loss Guarantee Sizer, both elsewhere in this catalogue, for an account-wide figure. - Break-even management only ever moves a stop to reduce risk (to the open price or better); it never widens an existing stop. - This EA trades in both directions with no daily trade-count limit and no news filter - it is a reference integration of technique, not a tuned, backtested strategy ready for live risk without further evaluation on the account it is deployed to.
Expert advisor · MT4 · v1.0 · Free
About Catalogue Capstone Portfolio EA
Catalogue Capstone Portfolio EA is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average and ATR. It moves the stop loss behind price (trailing stop / break-even) and can size trades from your balance and risk percent. It has 14 settings, such as Fast ma period, Slow ma period and Atr period. MQL source code included.
Files in the download: CatalogueCapstoneEa.ex4, CatalogueCapstoneEa.mq4, CatalogueCapstoneEa.txt.
Trading robots can lose money. Check every setting and test on a demo account before using real funds.
Settings
| Setting | Default | What it does |
|---|---|---|
| Fast ma period | 12 | Fast moving average period |
| Slow ma period | 48 | Slow moving average period |
| Atr period | 14 | ATR period used both for the trend filter and for sizing |
| Min atr trend pips | 8.0 | Minimum ATR, in pips, required for the cross to be treated as a real trend (technique 1) |
| Risk percent | 1.0 | Percent of account equity risked per trade (technique 2) |
| Atr stop multiple | 2.0 | Stop-loss distance = ATR * this multiple (technique 2 and 8) |
| Atr take profit multiple | 3.0 | Take-profit distance = ATR * this multiple |
| Break even atr multiple | 1.5 | Move stop to break-even once price has moved this many ATRs in profit; 0 = disabled |
| Magic number | 50000 | Magic number stamped on orders this EA opens |
| Slippage points | 30 | Maximum acceptable slippage, in points |
| Max floating loss percent | 6.0 | Technique 4: force-close all own positions if floating loss exceeds this percent of equity |
| Daily loss limit percent | 4.0 | Technique 6: self-computed daily loss ceiling, percent of day-start balance |
| Max spread points | 40 | Technique 7: refuse to trade if current spread exceeds this many points |
| Respect external kill switch | true | Technique 5: honour TRK_KillState from TerminalRiskKernel.mq4 if that GlobalVariable exists |
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: Moving Average · ATR · Buy/Sell Arrows · Trend · Trailing Stop & Break-even · Risk & Lot Size · MT4 Expert Advisor · MQL4 Source Code