Skip to the page

USD/CAD Signal Mix: RSI 21 + BB (20,1.5) (LightGBM, 15m)

USDCAD 15m, published 9 Sep 2026 by @silver-bull-130. Community id 276.

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

Out-of-sample result at publish, frozen

+17.26%

TradesWin rateProfit factorMax drawdown
2254.5%3.051.88%

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

−9.93%

TradesWin rateProfit factorMax drawdown
2123.8%0.4514.26%

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 @silver-bull-130

Random Mix strategy on USD/CAD 15min: API-default style: randomly composed indicator set, model learns the rule. Features: RSI 21, BB (20,1.5), ATR 10. Model: LightGBM. Label horizon 8 bars, confidence threshold 0.58, 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 5.

Run it yourself

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

Agents: POST /api/v1/fork/276MCP: one_shot(community_id=276)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-09 01:03:13
# Model            : LightGBM
# Feature Eng.     : RSI 21, BB (20,1.5), ATR 10
# 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, 17] UTC, trend sma_100
# ══════════════════════════════════════════════════════════════

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

DATA_PATH = "data/ohlc/USDCAD_15min.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 = 25.0
TAKE_PROFIT = 50.0
AUX_FEEDS = []

# SECTION 1 — FEATURE ENGINEERING
def feature_engineering(df, close, open_, high, low):
    # --- 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)
    # --- Bollinger Bands(20,1.5) ---
    _mid = close.rolling(20).mean()
    _sd = close.rolling(20).std()
    df["bb_20_1p5_pctb"] = (close - (_mid - 1.5 * _sd)) / (2 * 1.5 * _sd + 1e-10)
    df["bb_20_1p5_width"] = (2 * 1.5 * _sd) / (_mid + 1e-10)
    df["bb_20_1p5_width_chg"] = df["bb_20_1p5_width"].pct_change(3)
    # --- ATR(10) 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/10, adjust=False).mean()
    df["atr_10_pct"] = _atr / close
    df["atr_10_ratio"] = _atr / (_atr.rolling(40).mean() + 1e-12)

    # 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 LightGBM 15min",
        "model_type": "LGBMClassifier",
        "model_params": {
                "n_estimators": 400,
                "num_leaves": 31,
                "learning_rate": 0.05,
                "subsample": 0.8,
                "subsample_freq": 1,
                "colsample_bytree": 0.6,
                "min_child_samples": 20,
                "reg_lambda": 1.0,
                "random_state": 42,
                "n_jobs": 1,
                "verbose": -1
        },
        "signal_threshold": 0.58,
        "direction": "both",
        "stop_loss": 25.0,
        "take_profit": 50.0,
        "risk_unit": "pips",
        "cooldown": 0,
        "max_positions": 1,
        "on_opposite": "reverse",
        "session_filter": [
                7,
                17
        ],
        "min_atr": None,
        "trend_filter": "sma_100",
        "target_horizon": 8,
        "objective": "Random Mix strategy on USD/CAD 15min: API-default style: randomly composed indicator set, model learns the rule. Features: RSI 21, BB (20,1.5), ATR 10. Model: LightGBM. Label horizon 8 bars, confidence threshold 0.58, 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 USDCAD 15m

All USDCAD strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in