Nightshift
- Эксперты
-
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 - Версия: 1.4
- Активации: 5
"Your money doesn't sleep. Neither does Nightshift."
Nightshift is a multi-engine, regime-aware Expert Advisor for MetaTrader 5, built for the trader who works a real job, lives in a real timezone, and refuses to blow up their account while they sleep.
Most EAs sold on the MQL5 Market are single-strategy robots. One indicator. One timeframe. One set of parameters fitted to one symbol's history. They look brilliant in a backtest and fall apart the moment the market changes character. They hide martingale in their lot logic. They promise 99% win rates and quietly average down until the account is gone. They were never designed for you. They were designed to sell.
Nightshift was designed differently. It was designed for the trader in Frankfurt who wakes up at 7am and sees that the London breakout already happened. For the trader in Shanghai who is asleep when New York opens and the real move begins. For the trader in Istanbul working within a 1:10 leverage cap who needs the EA to understand margin is the binding constraint, not greed. For the trader in Warsaw, Dubai, Moscow, Singapore, and Hong Kong who has already lost money to one of the hundreds of grid EAs circulating on cracked forums and is not going to make that mistake again.
Nightshift runs four independent strategy engines under one risk governor. It reads the market regime before every decision. It enforces hard stop-losses on every position. It logs every decision in plain English. It shows you a health score that tells you whether the EA is operating in good conditions or bad. And it refuses to trade when the conditions that made its edges work have disappeared.
This is not a product that promises returns. It is a product that promises discipline. And in a market where between 74% and 89% of retail CFD accounts lose money according to ESMA's own regulatory analysis, discipline is the only edge that survives.
What Nightshift Actually Does
The Problem Nightshift Solves
Retail traders lose money for four documented reasons. These are not opinions. They are peer-reviewed findings from regulatory data, NBER working papers, and multi-year studies of millions of real trades.
One: The disposition effect. Retail traders hold losing positions far too long and close winning positions far too early. A 2025 study of over one million retail forex trades across 4,226 investors in 126 countries confirmed this pattern, and found it is strongest when traders are trading their home currency. A German trader holding a losing EUR/USD position will hold it longer than any other trade on their account. A Chinese trader holding a losing USD/CNH proxy position will do the same.
Two: The overconfidence ratchet. An NBER study of retail forex day traders found that after a winning week, traders increase both their trade size and their trade count, even though past performance has no predictive value for future returns. This is how accounts die. Not from one big loss, but from a string of wins followed by a size increase followed by a normal losing streak that the trader cannot survive.
Three: The leverage illusion. A Harvard study using proprietary broker data found that trade-level returns decline monotonically as leverage increases. At 2:1 leverage, the average trade returns 1.9 basis points. At 400:1 leverage, it returns negative 7.6 basis points. The study identified two causes: traders do not understand how leverage works, and they are overconfident about their ability to use it. This is why ESMA capped retail leverage at 30:1 in 2018 and why that intervention measurably improved retail outcomes.
Four: The friction drain. A June 2026 working paper analyzed the structural mechanics behind the 74% to 89% loss rate and computed the annualized friction cost for a standard retail trader at approximately 200% to 400% of initial capital before any directional losses. Spread, commission, slippage, and swap costs are not incidental. They are the primary mechanism by which retail accounts die.
Nightshift was built to structurally prevent all four.
How Nightshift Works: The Four Engines
Nightshift does not run one strategy. It runs four, each with a distinct economic rationale, each gated by market regime, each with its own risk budget, and each with a hard stop-loss set at order time. Every engine has its own magic number. Every engine can be independently enabled or disabled. Every engine writes its reasoning to the decision log.
Engine A: Session Opening-Range Breakout. This engine trades the Frankfurt and London open, and optionally the New York open. It builds a range from the preceding low-liquidity window, then enters on a breakout confirmed by a close beyond the range plus an ATR-scaled buffer. It includes a fake-break filter: if price re-enters the range within a defined number of bars, the position is cancelled or reversed to flat. Stop-loss sits beyond the opposite side of the range or at an ATR multiple, whichever is tighter but never inside the broker's minimum stop distance. Take-profit uses partial closes at fixed R-multiples plus an ATR trail on the remainder. One attempt per session per symbol. The engine skips entirely if the opening range is abnormally narrow or wide relative to its rolling percentile, which is the most common cause ofbreakout failure. Symbols: XAUUSD, GER40, EURUSD, GBPUSD, USDCHF.
Engine B: Trend Pullback. This engine trades with the higher-timeframe trend, entering on pullbacks into value zones rather than chasing breakouts. Trend is confirmed by market structure plus the Kaufman Efficiency Ratio and ADX. Entry requires a pullback into an EMA band, session VWAP, or prior swing level, followed by momentum re-acceleration. Stop-loss uses an ATR trail. Break-even is moved only after 1R plus structural confirmation, never mechanically. This is the engine that most closely mirrors how professional discretionary traders actually operate, and it is the engine that benefits most from Nightshift's regime filter, because trend pullback strategies fail catastrophically in ranging markets. Symbols: XAUUSD, EURUSD, GBPUSD, USDJPY, US30, NAS100, GER40.
Engine C: Range Reversion. This engine activates only when the regime classifier reports ranging or low-efficiency conditions. It trades deviations from session VWAP or Bollinger/ATR bands with exhaustion confirmation, targeting a return to the mean. Stop-loss sits beyond the extension. Strictly one position at a time. No averaging, ever. This engine exists because roughly 60% of market time is range-bound, and running a trend strategy during those periods is how accounts bleed. Symbols: EURCHF, EURGBP, AUDNZD, USDCHF, EURUSD during the Asia session, and optionally XAUUSD during the Asia range if validation supports it.
Engine D: Volatility Expansion (optional, disabled by default). This engine detects ATR percentile compression followed by expansion during the London-New York overlap, which corresponds to the evening in Beijing time. It ships disabled by default. It will only be enabled after the validation protocol demonstrates that it adds diversification without increasing tail risk. Most EAs would ship this enabled and market it as a feature. Nightshift ships it disabled and waits for the data.
The Capital Shield: Nightshift's Risk Governor
Every order Nightshift places passes through the Capital Shield before it reaches the broker. The Capital Shield is not a filter. It is a non-bypassable layer. No engine can skip it. No input can disable it. It evaluates on every tick and every timer cycle.
Per-trade risk. Every position is sized from the stop-loss distance, not from a fixed lot, not from a leverage multiple, not from an account percentage of margin. Risk per trade is a percentage of balance or equity, user-selectable. If the minimum lot size for a symbol would exceed the risk budget by more than a configurable tolerance, the trade is refused and logged. This is what protects a $500 account on a 1:500 offshore broker the same way it protects a $100,000 account on a 1:30 ESMA-regulated broker.
Maximum total open risk. Across all engines and all symbols, the Capital Shield caps the combined risk of all open positions. This is how Nightshift prevents the classic correlated-exposure disaster where a trader is long EUR/USD, long GBP/USD, long gold, and long the DAX, and does not realize all four positions are the same short-USD trade.
Daily loss limits. A soft stop that blocks new entries and a hard stop that flattens all positions and locks the EA until the next trading day. Both measured on equity against a day-start reference that is rebuilt from deal history after a terminal restart, so the limit survives a crash, a disconnect, or a VPS reboot.
Overall drawdown guard. Static from initial balance or trailing from peak equity, user-selectable, with configurable trip levels and buffers.
Consecutive-loss cooldown. After a defined number of consecutive losing trades, the EA pauses for a cooling-off period. Not because the next trade is more likely to lose, but because the trader behind the account is more likely to override the system after a losing streak.
Margin guard. OrderCalcMargin is called before every order. Free margin must remain above a configurable minimum. This is what makes Nightshift safe on a 1:10 Turkish account where margin is the binding constraint, and equally safe on a 1:1000 offshore account where margin is not.
Adaptive spread and slippage guards. Spread limits are percentile-based, not fixed pips. A fixed 3-pip spread limit that is reasonable on EUR/USD at 7am is suicidal on gold at 3pm during an FOMC release. Nightshift computes the rolling spread percentile per symbol and refuses trades when current spread exceeds a configurable percentile threshold.
Weekend and rollover guard. Optional flat-before-close. Optional avoidance of new entries around the daily rollover.
Kill switch. A single input and a dashboard panic button, both requiring confirmation, that close all positions and disable all engines immediately.
The Risk Ratchet Guard: Nightshift's Anti-Bias Feature
This is the feature no other EA on the MQL5 Market has, and it is the feature that most directly addresses the overconfidence finding from the NBER study.
Any increase to risk-per-trade, maximum open risk, or engine enablement takes effect only after a cooling-off period (default: the start of the next trading week) and requires an on-chart confirmation.
Decreases apply immediately.
The EA will never raise your size automatically after wins. Any equity-based scaling is capped and symmetrical. If you try to increase risk on a Friday afternoon after a winning week, Nightshift will tell you the change applies Monday, and it will show you a one-line note on the dashboard: "Risk increases apply from <date>."
This is not a gimmick. This is the single most important behavioural intervention in the product. The NBER study found that retail forex traders raise size after winning weeks. Nightshift makes that impossible to do impulsively.
Regime Awareness: Why Nightshift Does Not Trade the Same Way All the Time
Nightshift classifies each symbol's market regime in real time using a deterministic classifier built from the Kaufman Efficiency Ratio, ATR percentile against a rolling window, and session context. The classifier outputs one of three states: trend, range, or transition. No black boxes. No neural networks. No machine learning that cannot be explained.
The portfolio allocator then scales each engine's risk budget by regime fit. Engine B (trend pullback) runs at full budget in trend regimes and at zero in range regimes. Engine C (range reversion) does the opposite. Engine A (opening-range breakout) runs in either regime but adjusts its range-width filter. Engine D (volatility expansion) runs only when compression is detected.
The allocator also throttles each engine by its own equity-curve performance. If an engine's rolling expectancy drops below a defined threshold, its risk budget is reduced. It recovers gradually as performance recovers. This is not curve-fitting. This is portfolio management.
A correlation guard nets the combined exposure of correlated positions. Gold and long EUR/USD are both short-USD trades. US30, NAS100, and GER40 are all long-equity-beta trades. Nightshift identifies these clusters and nets their risk so the account is not accidentally running the same trade five times.
Transparency: The Decision Log, Health Score, and Weekly Reports
The Decision Log shows the last 20 decisions in plain English. Not "Signal: true." But "Skipped XAUUSD long: spread 38 points exceeds 90th-percentile limit of 30." Or "Engine B paused: efficiency ratio 0.12, regime classified as range." Every decision, every skip, every refusal, with the reason.
The Health Score is a 0 to 100 metric computed from execution quality, slippage versus expectation, spread conditions, rule compliance, and drawdown headroom. If the score drops below a configurable threshold, Nightshift will pause trading and tell you why. This is the feature that tells you whether the EA is operating in conditions where its edges work, or conditions where it should sit out.
Weekly and monthly reports are written to the MQL5/Files directory as HTML and CSV. The reports show win rate, average win, average loss, profit factor, maximum drawdown, trade count, average hold time, per-engine performance, and per-symbol performance. A separate trade journal CSV records every trade with its engine, its regime at entry, its reason for entry, and its exit reason.
Notifications are sent via MT5 mobile push, on-chart alerts, and optional email. Trades opened, trades closed, governor trips, news pauses, daily summaries, and error alerts. No Telegram. No WeChat. No external services. The MQL5 Market rules prohibit third-party links, and Nightshift's core does not depend on anything outside your terminal.
Broker Adaptation: Nightshift Works Where You Work
Nightshift was designed from the first line of code for the reality that brokers are not standardized.
Server time to UTC conversion. Nightshift does not rely on TimeGMT() inside the strategy tester, which is unreliable. It implements a server-to-UTC layer using a broker profile enum (GMT+0, GMT+2/+3 EET-style, GMT+1/+2 EU-DST) with explicit DST transition rules, auto-detection in live trading, and a manual override. This is the single most common silent killer of session-based strategies, and Nightshift handles it explicitly.
Symbol resolver. Brokers name gold differently. GOLD, XAUUSD, XAUUSD.m, XAUUSDm, GOLD.spot. Brokers name the DAX differently. GER40, DE40, DAX40, GER30, DE30. Nightshift resolves symbols by matching against SYMBOL_PATH, description, and an alias table, then confirms contract size, digits, tick size, tick value, and trading hours via SymbolInfo calls. It does not assume.
Filling modes, execution modes, stop level, freeze level. All read at runtime. Never assumed. Retry logic with GetLastError mapping, exponential backoff, and caps on requests per minute.
Netting and hedging accounts. Both supported. On netting accounts, positions aggregate per symbol, so engines coordinate through a position ledger keyed by engine via order comments and magic numbers, reconstructed on restart.
State persistence. Nightshift survives terminal restarts, VPS reboots, and disconnects. Engine states, day-start equity, cooldowns, and position ledgers are rebuilt from positions, history, and global variables on initialization.
Region Profiles: Nightshift Adapts to Your Regulatory Reality
Nightshift ships with region profiles that set sensible defaults for the constraints you actually trade under. Every value is overridable.
EU-ESMA Standard. Assumes 1:30 major FX, 1:20 gold. Conservative sizing. Frankfurt and London session focus. GER40, gold, and majors. News filter on. Hard daily caps.
EU-Prop. EU-ESMA plus the Risk Limits module enabled. News windows enforced. Flat before weekend. Designed for prop-firm evaluation accounts, with an explicit warning that users must verify their firm's EA policy.
Gold-Evening (Asia). Gold-centred. London-New York overlap emphasis. Heavy notifications. Fully autonomous operation for traders in Beijing, Shanghai, Hong Kong, Singapore, and Taipei who are asleep during the session.
Offshore High-Leverage Safe. Ignores available leverage entirely. Risk-percentage sizing only. Tight margin caps. This is the profile for the trader on a 1:500 or 1:1000 offshore account who wants institutional risk discipline on a retail leverage account.
Turkey-SPK 1:10. Margin-bound sizing. Fewer concurrent positions. Strict margin guard. Turkish UI strings. Designed for the trader working within the SPK 1:10 cap and TRY 50,000 minimum deposit reality.
Japan 25:1. Higher weight to USD/JPY and EUR/JPY engines. JPY account value handling. Designed for the JFSA 25:1 environment.
Gulf / Swap-Free. Swap-free account handling. Holding-time limits. Conservative overnight policy. Designed for Islamic accounts where brokers may apply administrative fees or holding-period limits in place of swap.
Custom. Pro Mode. Every parameter exposed.
What Nightshift Is Not
Nightshift is not a martingale EA. It does not double lot size after losses. It does not average down. It does not use grid. It does not hide lot multiplication in a "recovery" module.
Nightshift is not a high-frequency EA. It does not tick scalp. It does not use latency arbitrage. It does not attempt to exploit broker quote errors. It is banned on most prop firms and unnecessary for retail traders.
Nightshift is not a black box. It does not use neural networks, machine learning, or AI. It uses deterministic rules with documented economic rationale. Every engine header comment explains the edge hypothesis, who is on the other side of the trade, and when the engine should fail.
Nightshift is not a promise of returns. It is a system that enforces discipline, controls risk, and trades documented market patterns during the sessions when those patterns are most reliable. Past performance does not guarantee future results. Nightshift can lose money. You are responsible for monitoring it.
Who Nightshift Is For
Nightshift is for the trader who has already lost money to a grid EA and is not going to do it again.
Nightshift is for the trader who works a job and cannot watch charts at 3am but still wants exposure to the London and New York sessions.
Nightshift is for the trader on a regulated ESMA account who needs the EA to respect the 30:1 cap and the 20:1 gold cap without being told.
Nightshift is for the trader on a 1:500 offshore account who wants institutional risk discipline anyway.
Nightshift is for the trader in Istanbul on a 1:10 account where margin is the constraint.
Nightshift is for the trader in Beijing who is asleep when the real move happens.
Nightshift is for the trader who wants to see the reasoning, not just the result.
Nightshift is for the trader who would rather make 8 to 15 well-reasoned trades per month than 300 impulsive ones.
What You Get
-
The Nightshift .ex5 file, self-contained for MetaTrader 5
-
A user manual covering installation, Simple Mode, Pro Mode, region profiles, risk configuration, and the prop-firm Risk Limits module
-
Set-files for each region profile
-
A validation protocol document explaining how to backtest Nightshift correctly, including the gold regime stress tests
-
Access to the MQL5 blog for support, FAQ, and version updates
-
A public live signal showing real performance before you buy
The Final Word
Nightshift does not promise you will get rich. It promises that if you follow its rules, you will not blow up from the four documented reasons retail traders blow up. It promises hard stop-losses on every trade. It promises risk-percentage sizing. It promises no martingale, no grid, no averaging down. It promises a decision log that explains itself. It promises a health score that tells you when to sit out. It promises to work while you sleep.
Your money doesn't sleep. Neither does Nightshift.
