Skip to the page

USD/CHF Signal Mix: RSI 7 (Gradient Boosting, 5m)

USDCHF 5m, published 9 Sep 2026 by @rapid-shark-854. Community id 319.

The latest daily re-run lost money: −8.42% over 16 trades. At publish it made +10.11% over 47 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.11%

TradesWin rateProfit factorMax drawdown
4763.8%1.447.73%

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

−8.42%

TradesWin rateProfit factorMax drawdown
1631.2%0.5314.49%

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 @rapid-shark-854

Random Mix strategy on USD/CHF 5min: API-default style: randomly composed indicator set, model learns the rule. Features: RSI 7, Candle structure, Keltner (20,2.0). Model: Gradient Boosting. Label horizon 3 bars, confidence threshold 0.58, 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 2.

Run it yourself

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

Agents: POST /api/v1/fork/319MCP: one_shot(community_id=319)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-09 01:34:17
# Model            : Gradient Boosting
# Feature Eng.     : RSI 7, Candle structure, Keltner (20,2.0)
# 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/USDCHF_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):
    # --- RSI(7) with zone flags and slope ---
    _d = close.diff()
    _g = _d.clip(lower=0).ewm(com=6, min_periods=7, adjust=False).mean()
    _l = (-_d.clip(upper=0)).ewm(com=6, min_periods=7, adjust=False).mean()
    _rsi = 100.0 - 100.0 / (1.0 + _g / (_l + 1e-10))
    df["rsi_7"] = _rsi
    df["rsi_7_os"] = (_rsi < 30).astype(float)
    df["rsi_7_ob"] = (_rsi > 70).astype(float)
    df["rsi_7_slope"] = _rsi.diff(2)
    # --- Candle structure ---
    _rng = (high - low) + 1e-12
    df["body"] = (close - open_) / _rng
    df["upper_wick"] = (high - np.maximum(close, open_)) / _rng
    df["lower_wick"] = (np.minimum(close, open_) - low) / _rng
    df["range_pct"] = _rng / close
    df["range_rel"] = _rng / (_rng.rolling(20).mean() + 1e-12)
    # --- Keltner channel(20,2.0) 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) / (2.0 * _katr + 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/CHF Random Mix Gradient Boosting 5min",
        "model_type": "GradientBoostingClassifier",
        "model_params": {
                "n_estimators": 150,
                "max_depth": 2,
                "learning_rate": 0.03,
                "subsample": 0.8,
                "random_state": 42
        },
        "signal_threshold": 0.58,
        "direction": "both",
        "stop_loss": 15.0,
        "take_profit": 30.0,
        "risk_unit": "pips",
        "cooldown": 2,
        "max_positions": 1,
        "on_opposite": "reverse",
        "session_filter": [
                7,
                17
        ],
        "min_atr": None,
        "trend_filter": None,
        "target_horizon": 3,
        "objective": "Random Mix strategy on USD/CHF 5min: API-default style: randomly composed indicator set, model learns the rule. Features: RSI 7, Candle structure, Keltner (20,2.0). Model: Gradient Boosting. Label horizon 3 bars, confidence threshold 0.58, 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 USDCHF 5m

All USDCHF strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in