Portcullis
- Experts
-
Alex Amuyunzu Raymond
I’m an experienced MQL5 developer and software engineer specializing in building robust, high-performance algorithmic trading systems for MetaTrader 5. My work goes beyond standard EA development — I design intelligent, scalable solutions that combine market logic, automation, and external - Version: 1.2
- Activations: 5
Portcullis — The Gate That Only Opens When the Edge Is Real
A conditional session-open drive for index and FX CFDs. Built risk-first. Every order carries a hard stop. No martingale. No grid. No recovery sizing. Ever.
The problem nobody in the EA market wants to admit
Walk into any trading forum and count how many Expert Advisors are sold on the promise of a smooth equity curve, and then count how many of those same EAs blow up within eighteen months. The number is uncomfortable. The reason is not that a strategy failed — strategies always fail eventually — the reason is that the risk engine was never built to survive the failure. Grid systems average down into a margin call. Martingale systems double into a wipeout. Fixed-lot systems quietly take 40% of the account on a single instrument that gapped overnight. What retail traders buy, in most cases, is not a strategy at all. It is a well-disguised option on the seller's exit liquidity.
Portcullis was designed from the opposite end.
We did not start with a signal and then bolt on risk management as an afterthought. We started with the risk engine, made it uncompromising, and only then allowed a strategy inside it. The strategy is conditional, the position size is derived from the stop, the stop is set at order time, and the account has two independent halts that will shut everything down before the drawdown becomes a story. If the edge is not present, Portcullis does nothing. Doing nothing is a feature.
What Portcullis actually does
Portcullis trades a conditional session-open drive on the first minute timeframe. It is deliberately not a plain opening-range breakout. Plain opening-range breakouts on index CFDs are, after spreads and slippage, approximately breakeven — a fact any honest quant will confirm, and a fact most EA vendors quietly ignore while they sell you a chart full of arrows.
Instead, Portcullis waits for the moment when a session open is statistically abnormal. Specifically, it evaluates two conditions together:
-
Participation. It measures the tick volume of the opening window (default: the first fifteen minutes) and compares it to the median tick volume of the same window over the last twenty sessions. If current participation is not above a configurable percentile of that historical median, the session is skipped. No trade. The logic here is that a session open on normal flow is noise; a session open on abnormal flow is a genuine repricing event with follow-through potential.
-
Gap context. It measures the gap between the session's opening print and the prior daily close, and compares it to the prevailing ATR. If the gap is too small relative to ATR, the open is inside the previous session's noise and there is no contextual pressure to trade. If the gap is meaningful, the first candle's colour and its close location within the opening range determine directional bias.
When both conditions agree and the direction is unambiguous, Portcullis places a pending stop order just beyond the opening range, with a hard stop loss at the opposite side of that range, capped by an ATR multiple so that an unusually wide range cannot create an oversized stop. Exit is either at session-time flat or at a fixed R multiple — your choice. One trade per session per symbol. No re-entries. No "adding to winners." No "averaging into losers."
If the two conditions conflict, Portcullis skips. If participation is present but the gap context is absent, Portcullis skips. If the gap is present but the first candle is indecisive, Portcullis skips. The default state of Portcullis is not trading. That is the point.
Why session opens, and why only certain ones
Session opens are among the few moments in the trading day where the market is genuinely forced to reprice. Tokyo opens and the yen complex reprices against the prior New York close. Frankfurt opens and European index futures reconcile overnight US flow with European cash expectations. London opens and sterling and the FTSE absorb both Asian and pre-European positioning. New York opens and US index futures face the full weight of European close and US cash open simultaneously.
These are real events. But they are not all tradeable. Most session opens pass without abnormal participation, and the ones that do not are frequently the ones where the gap is already priced in and the follow-through is weak. Portcullis exists specifically to filter the small subset of session opens where participation and gap context and directional clarity all align. Everything else is discarded.
Markets covered, out of the box
Portcullis ships with a configuration table covering the five major equity-index session opens and the associated FX pairs:
-
Tokyo (09:00 JST): JP225, USDJPY
-
Hong Kong (09:30 HKT): HK50
-
Frankfurt (09:00 CET): GER40
-
London (08:00 GMT): UK100, GBPUSD
-
New York (09:30 EST): US100
Daylight saving is implemented in code, in the correct regional rules — EU DST changes on the last Sunday of March and October, US DST changes on the second Sunday of March and the first Sunday of November, Japan and Hong Kong have no DST. This matters: for several weeks each spring and autumn, the EU and US DST transitions are out of phase, and an EA that assumes a fixed GMT offset will trade the wrong window during those weeks. Portcullis handles it correctly.
Adding a new market is a single table row, not a new function. This is deliberate: it means the strategy is auditable in one screen, and the surface area for bugs is small.
The risk engine — the part that matters
Every commercial EA pays lip service to "risk management." Portcullis is built around it. Here is what the engine actually does, in the order it does it.
Position sizing is derived from the stop, never from leverage. Portcullis reads the symbol's SYMBOL_TRADE_TICK_VALUE , SYMBOL_TRADE_TICK_SIZE , and volume min/step/max, and computes the exact lot size that will produce your configured percentage risk if the stop is hit. It does not assume a contract size. It does not assume a pip value. It does not assume you are trading a standard lot account. It works on index CFDs, on FX pairs, and on UK spread-bet accounts where the "lot" is a per-point stake. It works on EUR, USD, GBP, JPY, and SGD-denominated accounts, because it reads the tick value in account currency directly from the broker.
Before every order, four independent checks run. First, the computed loss at the stop must not exceed the risk budget — if it does, the order is refused. Second, the volume must be within the symbol's min/step/max and within your hard max-lot ceiling. Third, the distance between entry and stop must satisfy the broker's stops-level requirement — if it does not, the order is refused rather than silently failing at the broker. Fourth, a margin check must pass with a 10% buffer on free margin. Any failure means the order does not go out. The reason is written to the decision journal.
After every fill, the actual risk is verified. If the fill price slipped enough that the realised loss at the stop exceeds the intended risk by more than a small tolerance, Portcullis logs it and, in the case of a gross breach, closes the position immediately. This is the check almost no commercial EA performs, and it is the check that catches the difference between what a backtest assumes and what a broker delivers.
Two independent account-level halts. A daily equity drawdown halt (default 3%) and a total equity drawdown halt (default 10%) both measure from equity, not balance, so floating losses count. When either is breached, all new orders are blocked for the rest of the day (daily) or until the EA is manually re-enabled (total). Positions that are already open are managed to their normal exit — the halts stop new risk, they do not panic-close. This is a design decision: panic-closing at the worst moment of a drawdown is how systems turn a bad day into a catastrophic one.
Spread, slippage, freeze-level and market-closed guards. Every order is gated on the current spread being under your configured maximum. Slippage is bounded by a deviation input. Freeze-level and market-closed states are respected — Portcullis will not send an order the broker will reject.
No duplicate orders after restart. Portcullis reconciles its state against open positions and pending orders on every tick, keyed by magic number. If you restart the terminal mid-session, it will not place a second order for a session it has already traded. This is tested routinely and it works.
Every trade return code is checked. Transient errors (requote, price changed, price off, timeout) are retried once after a short pause. Non-transient errors (invalid volume, invalid stops, market closed, trade disabled) are not retried — they are logged with the exact return code and the trade is abandoned for that session. Silent failure is not a category Portcullis recognises.
Absolutely no martingale, no grid, no averaging down, no recovery sizing. These are not inputs you can accidentally enable. They are not in the code. Every order is a single order with a hard stop. If the stop is hit, the loss is realised and the session is over. There is no mechanism in Portcullis by which one loss can cascade into a larger position on the next signal. This is not a claim — it is an architectural property. The code contains no loop that increases size after a loss. You can read it and confirm this in under a minute.
News filter and prop-firm mode
Portcullis reads the built-in MT5 economic calendar and blocks new orders within a configurable window around high-impact events (default 15 minutes before and after). If the calendar is unavailable — some brokers do not populate it — Portcullis degrades gracefully: it logs that the calendar is missing and continues with the rest of its filters active, rather than either silently trading through events or refusing to trade at all.
A compact prop-firm mode is included for traders running Portcullis on evaluation accounts: configurable daily and overall drawdown limits, an enforced news window, an optional weekend-flat routine, and a request-rate limiter so the EA does not spam the broker's API and trigger a rate-limit flag. Note clearly: Portcullis does not include, and will never include, anything designed to evade a prop firm's detection systems. It is a compliance-friendly tool for traders who want to pass evaluations by trading well, not by hiding.
Dashboard — engineered for the trader who wants to see the state of the system at a glance
Most EA dashboards are a stack of eight text labels with no visual hierarchy. Portcullis ships a layered panel: a header band with the product name and version, a title strip with the accent colour of your choice, and a two-column layout showing status, active profile, today's P&L in account currency, live risk usage as a percentage of equity, daily drawdown against its halt, total drawdown against its halt, the next high-impact news event with minutes-to-go, licence state, and the reason for the most recent trading decision.
The dashboard supports light and dark themes, and its text localises to English, Spanish, German, and Japanese — the four languages of Portcullis's core retail markets. Colours are state-driven: green when a metric is healthy, amber when it is approaching a limit, red when it is breached. The panel is positioned by input, so it never overlaps the price action unless you want it to.
The dashboard is not decoration. It is the interface through which you verify, in one glance, that the risk engine is doing what it is supposed to do.
Transparency: the decision journal and the trade log
Portcullis writes two CSV files. The journal records every decision the EA made — every order sent, and every order not sent, with the exact reason ("skip:participation", "skip:gap", "skip:news", "skip:spread", "skip:margin", and so on). The trade log records every closed position with its symbol, session, and net result.
This is unusual. Most EAs tell you what they did. Portcullis tells you what it did and what it refused to do, and why. After a month of live trading, you will have a complete record of every signal the system rejected. If you want to understand why the EA did not trade on a given day, you do not have to guess — the answer is in the journal, with a timestamp.
Verifiability is the entire point. You cannot verify a claim you cannot inspect.
Built-in testing tools
Portcullis ships with the tools you need to evaluate it honestly before you risk a cent.
-
PLACEBO mode. When enabled, Portcullis keeps its exact bracket structure, its exact risk engine, and its exact exit logic, but replaces the directional signal with a seeded coin-flip. This is the single most important test any trader can run on an EA. If the real strategy does not materially outperform the placebo over a reasonable sample, the "edge" is not there. Portcullis gives you the ability to run that comparison yourself, with the same code, on the same data. Very few commercial EAs offer this. Most would prefer you did not ask.
-
Per-module and per-session enable switches. Turn the M1 session module on or off. Turn the optional overnight module on or off. Add or remove sessions from the table. Isolate each component and see what it actually contributes.
-
Cost-stress inputs. Add extra spread and extra slippage assumptions to the backtest. This is how you find out whether a strategy is genuinely profitable or merely profitable under optimistic cost assumptions. Portcullis lets you answer that question with a single input change.
-
Custom OnTester criterion. Portcullis returns a net-expectancy-in-R score with a trade-count penalty, so the MT5 optimiser rewards strategies that are both positive and statistically meaningful, not strategies that won 12 trades out of 12 and called it a result.
-
End-of-test exports. Per-trade R-multiples, session, symbol, and cost, written to CSV at the end of every backtest run.
Portcullis does not claim any specific backtest result, and neither will you find a glossy equity-curve screenshot in this listing claiming a specific return. You cannot backtest what you cannot reproduce, and you cannot reproduce what you cannot inspect. Run it yourself, on your data, on your broker's costs. The EA is built so that you can.
Licence: offline, account-locked, honest about its limits
Portcullis ships with a simple account-number-locked licence check. When the input is set to a specific account number, the EA runs on that account and refuses to run on others. When the input is set to zero, the EA runs in trial mode for evaluation.
This is not a DRM system, and it is not presented as one. It is a lock that stops casual sharing, and it is honest about the fact that a determined user can bypass it. Portcullis is sold on its engineering, not on its copy protection. Traders who understand the product will not need to be forced to respect it.
Who Portcullis is for
Portcullis is for the trader who has already lost money — to the market, or to another EA — and who is no longer willing to accept a black box. It is for the trader who understands that the question is not "what is the return" but "what happens on the bad day, and how do I know it in advance." It is for the trader running a prop evaluation who needs an EA that behaves predictably under drawdown constraints. It is for the trader in Spain, Germany, the UK, Japan or Singapore who reads the manual, checks the code, and wants a tool whose failure modes are documented and whose risk engine is not negotiable.
Portcullis is not for the trader looking for a signal service, a promised return, or a system that trades every hour of every day. If that is what you want, this product is not for you and we would rather you know that before you buy it.
What Portcullis will not do
-
It will not guarantee profit. No EA can.
-
It will not trade through a session that fails its filters, no matter how tempting the chart looks.
-
It will not increase position size after a loss.
-
It will not hold a position through a weekend unless you explicitly configure it to.
-
It will not hide its risk from you in the dashboard.
-
It will not report a backtest result it did not generate.
-
It will not tell you what to trade. It executes a specific, documented, inspectable logic on the symbols you enable.
The honest summary
Portcullis is a conditional session-open drive with a risk engine that was built before the strategy was written. It trades fewer sessions than most EAs because it rejects most sessions. Every order it sends has a hard stop. Every position is sized from the stop, not from leverage. Every decision — including every decision not to trade — is written to a journal you can read. It ships with placebo mode, cost-stress inputs, and a custom optimiser criterion, so you can test the edge yourself instead of taking our word for it.
It is not the most aggressive EA on the Market. It is not the most exciting. It is, we believe, one of the few that a serious trader can actually verify.
The gate only opens when the edge is real. When it is not, the gate stays closed — and that is the whole point.
