Skip to the page

GBP/USD Signal Mix: RSI 14 (Random Forest, 5m)

GBPUSD 5m, published 9 Sep 2026 by @vega-puma-338. Community id 312.

Only 14 trades in the test at publish, too few to read much into. The latest daily re-run was flat: 0.00% over 0 trades. At publish it made +7.87% over 14 trades. The strategy stays listed, and its score is 0 until a recent window is positive. Only 0 trades in the re-run, too few to read much into.

Out-of-sample result at publish, frozen

+7.87%

TradesWin rateProfit factorMax drawdown
1450.0%1.723.40%

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

0.00%

TradesWin rateProfit factorMax drawdown
00.0%0.000.00%

This exact code trained again on the last 40 days, the last 30% held out. Only 0 trades, so the numbers are shown without colour: they are too few to read much into.

Description as published by @vega-puma-338

Random Mix strategy on GBP/USD 5min: API-default style: randomly composed indicator set, model learns the rule. Features: RSI 14, Stochastic (14,3), Keltner (20,2.0). Model: Random Forest. Label horizon 4 bars, confidence threshold 0.60, direction short. 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: power_limited, attempt 1.

Run it yourself

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

Agents: POST /api/v1/fork/312MCP: one_shot(community_id=312)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-09 01:34:17
# Model            : Random Forest
# Feature Eng.     : RSI 14, Stochastic (14,3), 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      : —
# ══════════════════════════════════════════════════════════════

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

DATA_PATH = "data/ohlc/GBPUSD_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(14) with zone flags and slope ---
    _d = close.diff()
    _g = _d.clip(lower=0).ewm(com=13, min_periods=14, adjust=False).mean()
    _l = (-_d.clip(upper=0)).ewm(com=13, min_periods=14, adjust=False).mean()
    _rsi = 100.0 - 100.0 / (1.0 + _g / (_l + 1e-10))
    df["rsi_14"] = _rsi
    df["rsi_14_os"] = (_rsi < 30).astype(float)
    df["rsi_14_ob"] = (_rsi > 70).astype(float)
    df["rsi_14_slope"] = _rsi.diff(2)
    # --- Stochastic(14,3) ---
    _ll = low.rolling(14).min()
    _hh = high.rolling(14).max()
    _k = 100.0 * (close - _ll) / (_hh - _ll + 1e-10)
    df["stoch_k_14"] = _k
    df["stoch_d_14"] = _k.rolling(3).mean()
    df["stoch_14_diff"] = df["stoch_k_14"] - df["stoch_d_14"]
    # --- 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": "GBP/USD Random Mix Random Forest 5min",
        "model_type": "RandomForestClassifier",
        "model_params": {
                "n_estimators": 200,
                "max_depth": 5,
                "min_samples_leaf": 5,
                "max_features": "sqrt",
                "random_state": 42,
                "n_jobs": 1
        },
        "signal_threshold": 0.6,
        "direction": "short",
        "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": 4,
        "objective": "Random Mix strategy on GBP/USD 5min: API-default style: randomly composed indicator set, model learns the rule. Features: RSI 14, Stochastic (14,3), Keltner (20,2.0). Model: Random Forest. Label horizon 4 bars, confidence threshold 0.60, direction short. 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 GBPUSD 5m

All GBPUSD strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in