Skip to the page

NZD/USD Signal Mix: Volatility 20 + EMA 12/26 (LogReg, 1h)

NZDUSD 1h, published 6 Sep 2026 by @pivot_kid. Community id 194.

Only 10 trades in the test at publish, too few to read much into. The latest daily re-run made +3.29% over 13 trades. At publish it made +7.21% over 10 trades.

Out-of-sample result at publish, frozen

+7.21%

TradesWin rateProfit factorMax drawdown
1060.0%2.342.68%

Tested on the 30% of days the model never saw.

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 24 Nov 2026

+3.29%

TradesWin rateProfit factorMax drawdown
1338.5%1.357.91%

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 @pivot_kid

Signal Mix strategy on NZD/USD 1h. A compact, machine-selected indicator set; the classifier learns the entry rule directly from the features. Features: Volatility 20, Session/time features, EMA 12/26 cross, Williams %R 21, RSI 21, ROC 5. Model: Logistic Regression; label horizon 9 bars, confidence threshold 0.55, direction both. Risk: 25 pip stop / 50 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 1h data and deploys it as your own model. Nothing is generated.

Agents: POST /api/v1/fork/194MCP: one_shot(community_id=194)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-06 15:33:05
# Model            : Logistic Regression
# Feature Eng.     : Volatility 20, Session/time features, EMA 12/26 cross, Williams %R 21, RSI 21, ROC 5
# 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 25 pips, Take profit 50 pips
# Risk Filter      : session [7, 20] UTC
# ══════════════════════════════════════════════════════════════

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

DATA_PATH = "data/ohlc/NZDUSD_1h.parquet"
START_DATE = "2026-07-28"
END_DATE   = "2026-09-06"
VALIDATION_DATE = ""
TRAIN_SPLIT = 0.7
LEVERAGE = 30.0
LOTS = 1.0
BALANCE = 10000.0
RISK_UNIT = 'pips'
STOP_LOSS = 25.0
TAKE_PROFIT = 50.0
AUX_FEEDS = []

# SECTION 1 — FEATURE ENGINEERING
def feature_engineering(df, close, open_, high, low):
    # --- Realised volatility(20) ---
    _r2 = close.pct_change()
    df["vol_20"] = _r2.rolling(20).std() * 1e4
    df["vol_20_ratio"] = df["vol_20"] / (_r2.rolling(80).std() * 1e4 + 1e-9)
    # --- 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)
    # --- EMA 12/26 crossover ---
    _ea = close.ewm(span=12, adjust=False).mean()
    _eb = close.ewm(span=26, adjust=False).mean()
    df["ema_12_26_diff"] = (_ea - _eb) / close * 1e4
    df["ema_12_26_diff_chg"] = df["ema_12_26_diff"].diff(1)
    df["ema_12_26_cross_up"] = ((_ea > _eb) & (_ea.shift(1) <= _eb.shift(1))).astype(float)
    df["ema_12_26_cross_dn"] = ((_ea < _eb) & (_ea.shift(1) >= _eb.shift(1))).astype(float)
    df["close_vs_ema_12"] = close / _ea - 1.0
    # --- Williams %R(21) ---
    _hh2 = high.rolling(21).max()
    _ll2 = low.rolling(21).min()
    df["willr_21"] = -100.0 * (_hh2 - close) / (_hh2 - _ll2 + 1e-10)
    # --- RSI(21) with zone flags and slope ---
    _d = close.diff()
    _g = _d.clip(lower=0).ewm(com=20, min_periods=21, adjust=False).mean()
    _l = (-_d.clip(upper=0)).ewm(com=20, min_periods=21, adjust=False).mean()
    _rsi = 100.0 - 100.0 / (1.0 + _g / (_l + 1e-10))
    df["rsi_21"] = _rsi
    df["rsi_21_os"] = (_rsi < 30).astype(float)
    df["rsi_21_ob"] = (_rsi > 70).astype(float)
    df["rsi_21_slope"] = _rsi.diff(2)
    # --- Rate of change(5) ---
    df["roc_5"] = close.pct_change(5) * 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 Logistic Regression 1h",
        "model_type": "LogisticRegression",
        "model_params": {
                "C": 0.1,
                "max_iter": 2000,
                "random_state": 42
        },
        "signal_threshold": 0.55,
        "direction": "both",
        "stop_loss": 25.0,
        "take_profit": 50.0,
        "risk_unit": "pips",
        "cooldown": 2,
        "max_positions": 1,
        "on_opposite": "reverse",
        "session_filter": [
                7,
                20
        ],
        "min_atr": None,
        "trend_filter": None,
        "target_horizon": 9,
        "objective": "Random Mix strategy on NZD/USD 1h: API-default style: randomly composed indicator set, model learns the rule. Features: Volatility 20, Session/time features, EMA 12/26 cross, Williams %R 21, RSI 21, ROC 5. Model: Logistic Regression. Label horizon 9 bars, confidence threshold 0.55, direction both. Risk: 25 pip stop / 50 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 1h

No other strategy on NZDUSD 1h passes the quality bar yet.

All NZDUSD strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in