ZScore Momentum Bot β Trading System Overview
- Prop & Funded Account Support
The bot uses a custom fitness function. Passes that breach Maximum Loss are excluded. All other passes are ranked by net profit. This means the optimisation grid surfaces only parameter combinations that would have traded within challenge boundaries β configurations that were profitable without violating the account stop-loss, regardless of whether they hit a daily limit along the way.
Sample of Optimized Parameters for XAU, Backtest interval Jan 2025 - March 2026
Drawdown Filter Enabled
Sample of Optimized Parameters for XAU, with Prop / Challenge Account DD Protection Enabled ( ! )
Backtest interval Jan 2026 - March 2026
- What This System Does
This bot combines a Z-Score regime detector, an Amplitude-Momentum (AMP) sequence detector, and a Bias directional filter β and only opens trades when all three agree. No trade is placed unless every layer is in alignment.
It also includes a dedicated Risk Limits layer built for prop firm and funded account challenges, enforcing daily loss, maximum loss, and profit target rules automatically using the same calculation methodology as major challenge providers
- The Three Analytical Layers
Z-Score Regime measures how far price has moved from its recent statistical mean. When the deviation exceeds a configurable threshold, a directional regime is active β Bull if price is significantly above the mean, Bear if significantly below, Neutral otherwise. Within a regime, the bot distinguishes between the first bar that triggered it (new signal) and bars where the regime simply continues β this distinction drives two of the three signal types.
Bias counts how many of the most recent bars were bull-colored versus bear-colored over a configurable lookback window. The direction with more bars defines the bias. It acts as a synchronisation gate: a long is only allowed when Bias is Bull and Z-Score is in Bull Regime; a short only when both point Bear. If they disagree, nothing opens regardless of what AMP says.
AMP Sequence analyses cumulative price returns to identify sustained directional moves above a minimum amplitude threshold, confirmed by OLS regression. It distinguishes between a sequence that is actively in progress and one that has just ended β both states are used, but for different entry types.
- Signal Types
There are three independent signal types, each enabled or disabled separately.
Type 1 β Fires when a new Z-Score regime begins at the same moment an AMP sequence is running in that direction. The earliest possible entry β fires once per regime start and does not repeat.
Type 2 β Fires on any bar where an established Z-Score regime and an active AMP sequence both point the same way. More frequent than Type 1 β useful for continuation and scaling entries during a strong trend.
Type 3 β Fires when the regime is established and a counter-move AMP sequence has just confirmed its end. This is a resumption trade, not a reversal β the regime provides the direction, the ended counter-sequence signals the pullback is complete.
All three types apply symmetrically to longs and shorts.
- Trade Entry Logic
Every new bar evaluates risk limits first, then Bias/Z-Score sync, then AMP conditions, then session filter and position count. A signal must be newly triggered β the condition must have been false the previous bar and true on the current bar. Partial alignment at any step produces no trade.
- Volume Sizing
Fixed Lot Size uses a constant lot for every trade regardless of account size β simple and predictable.
Equity % Risk sizes each trade so that a full Stop Loss hit costs exactly the configured percentage of current equity. Position size scales up as the account grows and down as it shrinks.
- Drawdown Scaling
Available in Equity % mode. When the account draws down from its high-water mark, lot sizes reduce proportionally between two configurable thresholds β a start level where scaling begins and a floor level where the minimum factor applies. The bot never stops trading; sizing simply compresses to a floor (e.g. 25% of normal) and recovers as the account does. The high-water mark uses realised balance only, so open floating profits do not inflate it.
- Other Trade Controls
Stop Loss and Take Profit are defined in pips and apply to every trade across all signal types.
Multiple Positions can be enabled per direction, with a configurable cap. Positions from different signal types carry independent labels.
Close Opposite on Signal closes all positions in the opposite direction before opening a new one, enforcing single-direction commitment at any given time.
Session Filter restricts entries to a configurable hourly window with GMT offset support. Midnight-crossing sessions work correctly. All analysis continues outside the session β only the final execution step is gated.
- Risk Limits β Prop & Funded Account Support
Each limit is independently toggleable. All three evaluate on every closed bar before any entry logic runs, and update the chart panel in real time.
Maximum Daily Loss (1%β10%) blocks trading for the rest of the CE(S)T calendar day once the daily drawdown reaches the threshold. The loss budget is a fixed monetary amount β calculated as the configured percentage of the initial account balance β subtracted from each day's opening balance. This matches how major prop firms define the rule: the budget stays constant regardless of whether the account has grown. When breached, all open positions are closed and entries are blocked until the CE(S)T midnight reset. At reset, the new day's opening balance is recorded and the breach flag clears. Reaching this limit is treated as a valid optimisation pass β the day was correctly restricted, the account was not failed.
Maximum Loss (5%β50%) is the account-level stop-loss. Equity must not drop below the configured percentage of the initial balance at any point. When breached, all positions close and no further entries are made. Intra-bar breaches β where a Stop Loss fires mid-bar and equity troughs below the floor before bar close β are caught during optimisation using the platform's own peak drawdown figure, not just bar-close equity. Any pass where recorded maximum drawdown meets or exceeds this limit receives a fitness score of β1 and is excluded from optimisation results.
Maximum Profit (5%β20%) locks in a completed result. When equity reaches the target, all positions are closed and no further entries are placed. This applies in all modes β live, demo, backtest, and optimisation β and prevents giving back gains after the challenge objective is met. Reaching this limit is a valid optimisation pass.
- Optimisation
The bot uses a custom fitness function. Passes that breach Maximum Loss are excluded. All other passes are ranked by net profit. This means the optimisation grid surfaces only parameter combinations that would have traded within challenge boundaries β configurations that were profitable without violating the account stop-loss, regardless of whether they hit a daily limit along the way.
5 | 0 % | |
4 | 67 % | |
3 | 33 % | |
2 | 0 % | |
1 | 0 % |