Skip to the page

NZD/USD Signal Mix: Z-score 20 + ATR 14 (Extra Trees, 5m)

NZDUSD 5m, published 9 Sep 2026 by @elastic-moose-350. Community id 313.

The latest daily re-run made +2.61% over 13 trades. At publish it made +11.31% over 50 trades.

Out-of-sample result at publish, frozen

+11.31%

TradesWin rateProfit factorMax drawdown
5070.0%1.647.92%

A strategy can be published only when this test made money, so this number was chosen to be positive. The daily re-run is the fairer read.

Daily re-run 23 Nov 2026

+2.61%

TradesWin rateProfit factorMax drawdown
1353.8%1.353.79%

This exact code trained again on the last 40 days, the last 30% held out. A loss shows here and never removes the page.

Description as published by @elastic-moose-350

Random Mix strategy on NZD/USD 5min: API-default style: randomly composed indicator set, model learns the rule. Features: Z-score 20, ATR 14, BB (50,2.0), Return lags 1-3, Session/time features, ROC 20. Model: Extra Trees. Label horizon 3 bars, confidence threshold 0.55, direction both. Risk: 15 pip stop / 30 pip target (1:2 R/R), 1.0 lot on $10k, $6 round-trip commission.

Walk-forward check at publish: noise, attempt 1.

Run it yourself

Trains this exact code on fresh NZDUSD 5m data and deploys it as your own model. Nothing is generated.

Agents: POST /api/v1/fork/313MCP: one_shot(community_id=313)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-09 01:34:17
# Model            : Extra Trees
# Feature Eng.     : Z-score 20, ATR 14, BB (50,2.0), Return lags 1-3, Session/time features, ROC 20
# Signal / Entry   : API-default style: randomly composed indicator set, model learns the rule
# Optimization     : Maximize out-of-sample return with a 70/30 holdout
# Risk Mgmt        : Stop loss 15 pips, Take profit 30 pips
# Risk Filter      : —
# ══════════════════════════════════════════════════════════════

# ============================================================
# SECTION 0 — IMPORTS & CONSTANTS
import numpy as np
import pandas as pd

DATA_PATH = "data/ohlc/NZDUSD_5min.parquet"
START_DATE = "2026-07-31"
END_DATE   = "2026-09-09"
VALIDATION_DATE = ""
TRAIN_SPLIT = 0.7
LEVERAGE = 30.0
LOTS = 1.0
BALANCE = 10000.0
RISK_UNIT = 'pips'
STOP_LOSS = 15.0
TAKE_PROFIT = 30.0
AUX_FEEDS = []

# SECTION 1 — FEATURE ENGINEERING
def feature_engineering(df, close, open_, high, low):
    # --- Z-score(20) of close ---
    df["zscore_20"] = (close - close.rolling(20).mean()) / (close.rolling(20).std() + 1e-12)
    df["zscore_20_chg"] = df["zscore_20"].diff(1)
    # --- ATR(14) normalised ---
    _tr = pd.concat([high - low, (high - close.shift(1)).abs(), (low - close.shift(1)).abs()], axis=1).max(axis=1)
    _atr = _tr.ewm(alpha=1.0/14, adjust=False).mean()
    df["atr_14_pct"] = _atr / close
    df["atr_14_ratio"] = _atr / (_atr.rolling(56).mean() + 1e-12)
    # --- Bollinger Bands(50,2.0) ---
    _mid = close.rolling(50).mean()
    _sd = close.rolling(50).std()
    df["bb_50_2p0_pctb"] = (close - (_mid - 2.0 * _sd)) / (2 * 2.0 * _sd + 1e-10)
    df["bb_50_2p0_width"] = (2 * 2.0 * _sd) / (_mid + 1e-10)
    df["bb_50_2p0_width_chg"] = df["bb_50_2p0_width"].pct_change(3)
    # --- Return lags 1..3 ---
    _r = close.pct_change() * 1e4
    for _i in range(1, 4):
        df[f"ret_lag_{_i}"] = _r.shift(_i - 1)
    df["ret_sum_3"] = _r.rolling(3).sum()
    # --- Time-of-day / day-of-week (UTC) ---
    _h = df.index.hour + df.index.minute / 60.0
    df["hour_sin"] = np.sin(2 * np.pi * _h / 24.0)
    df["hour_cos"] = np.cos(2 * np.pi * _h / 24.0)
    df["dow"] = df.index.dayofweek.astype(float)
    df["london_open"] = ((df.index.hour >= 7) & (df.index.hour < 10)).astype(float)
    df["ny_open"] = ((df.index.hour >= 13) & (df.index.hour < 16)).astype(float)
    # --- Rate of change(20) ---
    df["roc_20"] = close.pct_change(20) * 1e4

    # Fill indicator warm-up gaps without looking ahead
    df = df.ffill().fillna(0.0)
    return df


# SECTION 2 — STRATEGY CONFIG
def strategy_config():
    return {
        "title": "NZD/USD Random Mix Extra Trees 5min",
        "model_type": "ExtraTreesClassifier",
        "model_params": {
                "n_estimators": 200,
                "max_depth": 8,
                "min_samples_leaf": 10,
                "max_features": "sqrt",
                "random_state": 42,
                "n_jobs": 1
        },
        "signal_threshold": 0.55,
        "direction": "both",
        "stop_loss": 15.0,
        "take_profit": 30.0,
        "risk_unit": "pips",
        "cooldown": 0,
        "max_positions": 1,
        "on_opposite": "reverse",
        "session_filter": None,
        "min_atr": None,
        "trend_filter": None,
        "target_horizon": 3,
        "objective": "Random Mix strategy on NZD/USD 5min: API-default style: randomly composed indicator set, model learns the rule. Features: Z-score 20, ATR 14, BB (50,2.0), Return lags 1-3, Session/time features, ROC 20. Model: Extra Trees. Label horizon 3 bars, confidence threshold 0.55, direction both. Risk: 15 pip stop / 30 pip target (1:2 R/R), 1.0 lot on $10k, $6 round-trip commission.",
        "notes": "Generated by the QuantifyMe strategy forge. SL/TP are in pips and match the dashboard defaults, so pasting this code into the Code tab reproduces the published backtest on the same window."
    }

More on NZDUSD 5m

No other strategy on NZDUSD 5m passes the quality bar yet.

All NZDUSD strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in