Skip to the page

USD/CAD Signal Mix: EMA ribbon 8-55 (Extra Trees, 5m)

USDCAD 5m, published 9 Sep 2026 by @delta-atlas-858. Community id 280.

Only 18 trades in the test at publish, too few to read much into. The latest daily re-run lost money: −4.22% over 11 trades. At publish it made +10.42% over 18 trades. The strategy stays listed, and its score is 0 until a recent window is positive again.

Out-of-sample result at publish, frozen

+10.42%

TradesWin rateProfit factorMax drawdown
1855.6%2.242.53%

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

−4.22%

TradesWin rateProfit factorMax drawdown
1127.3%0.495.90%

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 @delta-atlas-858

Random Mix strategy on USD/CAD 5min: API-default style: randomly composed indicator set, model learns the rule. Features: EMA ribbon 8-55, Keltner (20,1.5), MACD (12,26,9), Donchian 20, CCI 14, ROC 3. Model: Extra Trees. Label horizon 4 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 USDCAD 5m data and deploys it as your own model. Nothing is generated.

Agents: POST /api/v1/fork/280MCP: one_shot(community_id=280)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-09 01:03:05
# Model            : Extra Trees
# Feature Eng.     : EMA ribbon 8-55, Keltner (20,1.5), MACD (12,26,9), Donchian 20, CCI 14, ROC 3
# 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      : session [7, 17] UTC
# ══════════════════════════════════════════════════════════════

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

DATA_PATH = "data/ohlc/USDCAD_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):
    # --- EMA ribbon alignment (8/13/21/34/55) ---
    _es = [close.ewm(span=_n, adjust=False).mean() for _n in (8, 13, 21, 34, 55)]
    df["ribbon_align"] = sum(((_es[_i] > _es[_i + 1]).astype(float) * 2 - 1) for _i in range(4))
    df["ribbon_spread"] = (_es[0] - _es[-1]) / close * 1e4
    # --- Keltner channel(20,1.5) position ---
    _kmid = close.ewm(span=20, adjust=False).mean()
    _ktr = pd.concat([high - low, (high - close.shift(1)).abs(), (low - close.shift(1)).abs()], axis=1).max(axis=1)
    _katr = _ktr.ewm(alpha=1.0/20, adjust=False).mean()
    df["kelt_20_pos"] = (close - _kmid) / (1.5 * _katr + 1e-12)
    # --- MACD(12,26,9) ---
    _m = close.ewm(span=12, adjust=False).mean() - close.ewm(span=26, adjust=False).mean()
    _sig = _m.ewm(span=9, adjust=False).mean()
    df["macd_12_26"] = _m / close * 1e4
    df["macd_12_26_sig"] = _sig / close * 1e4
    df["macd_12_26_hist"] = (_m - _sig) / close * 1e4
    df["macd_12_26_hist_chg"] = df["macd_12_26_hist"].diff(1)
    # --- Donchian channel(20) position & breakout ---
    _dh = high.rolling(20).max().shift(1)
    _dl = low.rolling(20).min().shift(1)
    df["donch_20_pos"] = (close - _dl) / (_dh - _dl + 1e-10)
    df["donch_20_break_up"] = (close > _dh).astype(float)
    df["donch_20_break_dn"] = (close < _dl).astype(float)
    # --- CCI(14) ---
    _tp = (high + low + close) / 3.0
    _tpm = _tp.rolling(14).mean()
    _md = (_tp - _tpm).abs().rolling(14).mean()
    df["cci_14"] = (_tp - _tpm) / (0.015 * _md + 1e-12)
    # --- Rate of change(3) ---
    df["roc_3"] = close.pct_change(3) * 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": "USD/CAD Random Mix Extra Trees 5min",
        "model_type": "ExtraTreesClassifier",
        "model_params": {
                "n_estimators": 400,
                "max_depth": 8,
                "min_samples_leaf": 5,
                "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": 2,
        "max_positions": 1,
        "on_opposite": "close_only",
        "session_filter": [
                7,
                17
        ],
        "min_atr": None,
        "trend_filter": None,
        "target_horizon": 4,
        "objective": "Random Mix strategy on USD/CAD 5min: API-default style: randomly composed indicator set, model learns the rule. Features: EMA ribbon 8-55, Keltner (20,1.5), MACD (12,26,9), Donchian 20, CCI 14, ROC 3. Model: Extra Trees. Label horizon 4 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 USDCAD 5m

All USDCAD strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in