Phase F2 migration target — MONITOR · Overview
Total Funded
–
Total Balance
–
Overall P&L
–
Total Spent NZD
–
Withdrawn USD
–
Accs (L/E/F)
–
Session Losses
–
Account Overview
Journal Stats
–
Win Rate
–
Total P&L
–
Expectancy
–
Total Trades
BC
Brandycandy bot online. Session started.
Paste a chart screenshot (Ctrl+V), type a setup, or ask anything. I'll call out impatience, revenge trades, and over-trading hard. Let's get to work.
Paste a chart screenshot (Ctrl+V), type a setup, or ask anything. I'll call out impatience, revenge trades, and over-trading hard. Let's get to work.
Session start
⚠ FATIGUE WARNING — You've been trading for 4+ hours. Step away. Tired traders make bad decisions.
Ctrl+V = paste chart • Enter = send • Shift+Enter = newline
Instrument & Direction
Price Levels — enter prices OR just SL distance below
Risk Parameters
Enter SL distance or prices above to calculate.
⚡ Scalp Panel
Multi-Account Execution Panel
No trade loaded. Use the Calculator tab and click "Send to Execute Panel".
⚠ HEDGING DETECTED — One or more accounts already has an open trade in the opposing direction on this instrument. Check before proceeding.
🚫 One or more accounts are near their daily loss limit and have been auto-deselected. Review before executing.
Select accounts to trade
Loading accounts…
Execution settings
Auto-detect: set entry price in Calculator to see order type
🛡 Risk Summary (v5.14 Caps)
Loading risk state…
Open Positions (MT5 Live — All Terminals)
Instrument
Acc
Type
Entry
SL
Current
TP
TP Src
BE?
Lots
P&L
Actions
No open positions
⚡ Auto-Placed Positions
Instrument
Acc
Dir
Entry
SL
TP
Lots
P&L
Strategy
Actions
No auto-placed positions detected
⟡ LIVE VS BACKTEST PARITY—
📊 Live vs Backtest Parity —
Rolling 30-day live/paper performance vs 1y XAUUSD 2023 backtest baseline. Flags fire if live WR is ≥5pp below baseline.
baseline: —
Paper (30d)
—
Live (30d)
—
Shadow ML accuracy
—
Log Trade
–
Win Rate
–
Net P&L
–
Expectancy
–
Trades
–
Fee Drag
⬇
Export CSV
Filter:
No trades logged yet.
Account Manager
Account Journey Tracker
Every account transition (eval start → eval pass/fail → funded → payouts → blown) is captured with a performance snapshot. Use these metrics to decide which account sizes to run and how many. Data-driven scaling, not guesswork.
Eval Pass Rate
—
—
Funded Survival (to 3rd payout)
—
—
Avg Days Eval → Funded
—
Lower is better
Avg Days Funded → 1st Payout
—
Lower is better
Lifecycle Event Counts
Loading…
Per-Account Timeline
Latest event per account
Loading…
Strategy Performance (across all journey events)
Loading…
🔮 Scalability Forecast
Projects monthly income and breakeven using your measured pass and survival rates. With no data yet, uses conservative defaults (40% pass, 50% survival).
🧠 ML Layer C — Trailing Optimizer (Data Logging)
Phase A records every trailing decision (state + action) so a PPO/RL agent can be trained offline later. Zero trading impact. Need ≥1,000 decisions before training.
Loading…
Recent Events (latest 30)
Loading…
Fatigue Pattern Analysis
Builds from your journal history over time.
🤖 Claude Notifications
Summaries, post-mortems, and anomaly narrations land here. Enable in Settings → Claude Integration.
Loading…
Settings
🔍/
No matches
Try a different keyword or clear search to browse all panels.
⚙ System
System Console — Build 11 v5
Live ring buffer of all bot output — stdout, logging, and unhandled exceptions. Updates every 5s. Filter by severity/source/search. Use "Copy All" to share with AI or paste into a handover.
Recommended filter:
Recommended filter:
WARNING+ for day-to-day monitoring, ERROR+ to only see failures, DEBUG+ when actively debugging a new feature. Loading…
Severity filter
| DEBUG+ | Everything — use when reproducing a specific bug |
| INFO+ | Trades, startups, MT5 connects, [P10] gate outcomes |
| WARNING+ | Recommended default — daily monitoring |
| ERROR+ | Only show failures — quickest "is anything broken?" check |
| CRITICAL | Catastrophic only — should be empty |
Line colour
Red — blocked trade, crash, error, failure
Green — trade placed, training complete, bot recovered
Amber — partial qualify, cooldown, warning
Cyan — scanner/multi-TF/migration info
Muted — routine background noise
P10 gates (auto-trade pipeline)
| Gate 2 | SMC_AMD sequence stage < required |
| Gate 3 | Non-SMC strategy blocked by SMC-only toggle, or Asia toggle off |
| Gate 4 | Strategy score below min (p10_X_score_min) |
| Gate 5 | Ensemble disagreement between parameter sets |
| Gate 6 | SP-4 unvalidated (need 20+ tagged trades) |
| Gate 7 | Upcoming high-impact news |
| Gate 7b | Post-news cooldown active |
| Gate 7c | DD velocity breach (account or per-strategy) |
| Gate 8 | Session mismatch (SMC/Breakout need London/NY; MeanRev needs Asia/NY PM) |
| Gate 9 | Regime mismatch (SMC/Breakout need trending/expansion; MeanRev needs ranging) |
| Gate 10 | Spread above spread_mult× typical |
| Gate 11 | Instrument cooldown active (default 60m) |
| Gate 12 | All accounts at daily DD hard stop |
| Gate 13 | Instrument already has an open trade |
| Item 5 | Funded consistency block (best day ≥15% of total PnL) |
| Gate 14 | ML Layer A win probability below threshold |
| Gate 15 | ML Layer B continuation prob or phase filter |
Tip: type
[P10] in the search box to see only auto-trade events. Combine with WARNING+ to see only blocks & execs. Bot Control & Health
Restart the bot, check system health, and see library versions — no RDP needed.
Uptime
—
DB Size
—
Trades
—
Paper Trades
—
Events
—
PyTorch
—
XGBoost
—
Waitress
—
Restart Live Bot
Restarts the live trading bot to activate code changes. The Flask process exits cleanly; the watchdog detects the process is dead and respawns it within ~30 s. Does NOT affect running backtests — those run as separate subprocesses launched by
run_backtest.py and continue independently. Watchdog Controls
Start, stop, or restart the watchdog PowerShell process. Tries the Windows Scheduled Task first (
BrandycandyWatchdog), falls back to direct script launch / process kill. Click "Check Status" to see watchdog state.
Background Jobs
ML training + backfill runs asynchronously. Pending and running jobs appear here with progress. Cancel in flight without restarting the bot.
No jobs yet.
General
SP-4 Strategy Activation GateENABLED
When ON, strategies require 20+ closed journal trades per instrument before firing at full score — prevents signals on unvalidated setups.
Turn OFF if your journal trades have no strategy tags, or on a fresh install.
Turn OFF if your journal trades have no strategy tags, or on a fresh install.
Settings Debug — Raw DB Values
Click Refresh to load raw DB values
System Info
API Key
Checking…
Saves to database — persists across restarts. Get your key from console.anthropic.com
Bot Control
⬆ DEPLOY FILESBot will restart automatically via wrapper script
Set a deploy password, then use brandycandytrading.com/deploy from any device to upload updated zip files. Bot auto-restarts after deploy.
Kill Zones
| Session | UTC | NZ Time |
|---|---|---|
| Loading… | ||
Prop Firm Rules
Profit target: 6%
Daily loss limit: 3%
Max trailing drawdown: 6%
Payout split: 80%
Min profitable days: 3 (≥0.5%)
Consistency: best day ≤ 20% of total
Payout cycle: every 14 days
Daily loss limit: 3%
Max trailing drawdown: 6%
Payout split: 80%
Min profitable days: 3 (≥0.5%)
Consistency: best day ≤ 20% of total
Payout cycle: every 14 days
MT5 Connection
Checking MT5 status…
▸ Manual credentials (if account not in list)
/
Active = chat used in last 60 min. MT5 candle pulls are local/free.
Terminal Manager
Loading terminals…
Check boxes = auto-launch on bot start. Force Launch opens the terminal without connecting. Secondary account imports now run every 5 min (configurable) instead of every 60s to prevent terminal reconnection storms.
MT5 Trade History Import
MT5 must be connected first.
📊 Trading Behaviour
Initial SL Sizing (ATR)
Per-instrument-class ATR multipliers used when computing the initial stop-loss distance at entry.
Runtime trail uses Mode 3 (Structure Trail) + Adaptive Trail below; the legacy Mode-2 ATR runtime trail has been removed.
Runtime trail uses Mode 3 (Structure Trail) + Adaptive Trail below; the legacy Mode-2 ATR runtime trail has been removed.
ATR Multiplier Defaults
SL Management — Adaptive Trail replaces BE-at-1R when enabled
Profit-level-dependent SL ladder. Each band cuts more risk or locks more profit as price moves in your favour.
SL only tightens, never widens. Above 3R, control hands off to the structure trail (Mode 3).
SL only tightens, never widens. Above 3R, control hands off to the structure trail (Mode 3).
Gradient Bands (multiplier of original SL distance)
Negative = SL below entry (LONG; mirror for SHORT). Positive = SL above entry (locks profit). Example LONG entry 1.0800, SL 1.0780, dist=20pips.
1p5R_sl=0.3 → SL = 1.0800 + 0.3×20pips = 1.0806. Presets
Conservative: wider SL — leaves more room (0.7R: −0.7 / 1R: −0.4 / 1.5R: 0.0 / 2R: 0.5).
Balanced: bot defaults (0.7R: −0.5 / 1R: −0.2 / 1.5R: 0.3 / 2R: 0.8).
Aggressive: tighter — locks profit sooner (0.7R: −0.3 / 1R: 0.0 / 1.5R: 0.5 / 2R: 1.0).
Balanced: bot defaults (0.7R: −0.5 / 1R: −0.2 / 1.5R: 0.3 / 2R: 0.8).
Aggressive: tighter — locks profit sooner (0.7R: −0.3 / 1R: 0.0 / 1.5R: 0.5 / 2R: 1.0).
Signal Sensitivity Advanced
⚠ Changes affect signal frequency, not signal quality. Lowering thresholds = more signals, more false positives.
Strategy score minimums (SMC_AMD, Breakout, MeanRev) are now managed in the Execute tab → Scalp Panel.
Entry Filter Thresholds
Sweep Detection Sensitivity (ATR multiplier)
Controls how far price must exceed a swing high/low before it counts as a liquidity sweep. Lower = easier to detect. Check sweep debug logs before adjusting.
Performance Feedback Loop
⚠ Warning: Do NOT enable until ≥50 real closed trades are logged across multiple instruments AND the strategy engine (Items D/E/F/H) has been verified live for ≥2 weeks. Enabling early will cause the system to optimise against noise and actively degrade signal quality.
When enabled, the system analyses closed trade win rates per instrument×strategy and proposes parameter threshold adjustments. Requires ≥30 trades per combination to activate. Rolls back automatically if performance drops >10% within 20 trades of a change.
SL Management — Mode 3 (Structure Trail) BETA — off by default
Automatically trails SL to the most recent 1H swing low (LONG) or swing high (SHORT) when a better level exists.
Runs every 60 s inside the MT5 monitor loop. SL can only move in your favour.
⚠ Enable only after verifying MT5 connectivity and reviewing the
Runs every 60 s inside the MT5 monitor loop. SL can only move in your favour.
⚠ Enable only after verifying MT5 connectivity and reviewing the
place_order() lot validation fix.Loading…
Per-position overrides available on each open position card in the Execute tab.
Swing detection: 5-candle lookback each side on 1H chart (configurable in code via
Swing detection: 5-candle lookback each side on 1H chart (configurable in code via
lookback=5). v5.17 — Execution Quality (Task 4)
Spread gate measures a rolling EMA of spread per instrument. When the live spread at fire time exceeds
Overlap block hard-blocks nominated instruments during the LDN/NY overlap window (12:00–16:00 UTC). Default OFF — opt in by listing instruments.
multiplier × EMA, placement delays and re-checks once. If still wide, the trade is skipped. Target: kill the 0.1–0.3R slippage on wide-spread entries. Defaults ON.Overlap block hard-blocks nominated instruments during the LDN/NY overlap window (12:00–16:00 UTC). Default OFF — opt in by listing instruments.
Spread-Aware Gate (4a)
Higher alpha = EMA reacts faster to recent samples. Lower = smoother but slower to adjust after a regime change.
LDN/NY Overlap Block (4b)
Window is inclusive-start, exclusive-end. Only blocks instruments in the list; others trade normally.
v5.22 — Limit-Order-Only Mode
What this does: wires
When to enable: if you're seeing slippage costs on NAS100 / XAUUSD or if filled prices consistently worse than scanner entry. Leave OFF for the Execute-tab manual chain — it has its own order-type selector.
Per-strategy: turn on only for strategies where pullback entries are the norm. Breakout_Continuation should stay OFF — breakouts need immediate fills.
Stop-order handling: when get_auto_order_type returns "stop" (breakout above live price), the trade is SKIPPED — market-on-breakout has the same slippage problem we're avoiding.
Failure mode: if MT5 rejects the limit or the resolver fails, the trade falls back to market. Zero silent drops.
mt5_service.get_auto_order_type() into the AUTO-trade fire path. When the scanner entry is far enough from live price to count as a pullback, a LIMIT order is placed at the scanner entry instead of a market order — avoiding slippage on volatile instruments.When to enable: if you're seeing slippage costs on NAS100 / XAUUSD or if filled prices consistently worse than scanner entry. Leave OFF for the Execute-tab manual chain — it has its own order-type selector.
Per-strategy: turn on only for strategies where pullback entries are the norm. Breakout_Continuation should stay OFF — breakouts need immediate fills.
Stop-order handling: when get_auto_order_type returns "stop" (breakout above live price), the trade is SKIPPED — market-on-breakout has the same slippage problem we're avoiding.
Failure mode: if MT5 rejects the limit or the resolver fails, the trade falls back to market. Zero silent drops.
Limit orders auto-expire. 15m is the sweet spot — long enough for pullbacks, short enough that stale setups don't fire.
Tally (all time):— limit orders fired · — stop-route skips
Loading EMA state…
v5.18 — Partial-Close Ladder (Task 5a)
Replaces the current single 50%-at-TP1 partial with a configurable 3-rung ladder. Each rung closes a percentage of the original lot size at a different profit level. Remainder rides with BE+buffer trail.
Default OFF — enable deliberately after observing baseline. Broker TP shifts past TP2 as safety net when ladder is active.
Default OFF — enable deliberately after observing baseline. Broker TP shifts past TP2 as safety net when ladder is active.
Rung Percentages
Rider: 10% rides with BE+buf trail
Advanced
Broker TP shifts to TP2 + buffer × SL_distance when rung 1 fires. If the bot stops monitoring, the broker still catches the position at this safety TP.
Continuous Shadow Mode BETA
Fires paper trades 24/7 alongside live trades for calibration data. Shadow trades are DB-only — never sent to MT5. Generates ground-truth data for calibrating the backtest engine (Phase 3). Recommended: run for 30+ days before Phase 3.
—
Off-Hours Penalty System L1 ACTIVE · L2 SHADOW
Soft-penalty applied to
strategy_score at Gate 4 when a setup fires during Off-Hours and spread is elevated vs the instrument's normal-hours baseline. Coexists with Gate 8 (hard session block) and Gate 10 (hard spread cap). News-aware: penalty is reduced by the configured factor when a high-impact news event is imminent. Layer 1 Configuration (Active)
Layer 1 Live Status
Active baselines
—
Missing baselines view list
—
Penalties applied (24h)
—
Blocked by penalty (24h)
—
Passed despite penalty (24h)
—
Layer 2 Configuration (Shadow Mode)
StatusSHADOW MODE
Auto-activation threshold0 / 1000 Off-Hours trades
When the threshold is met AND Layer 2 outperforms Layer 1, Layer 2 will auto-activate after a 1 hour notification window (you'll receive an email). Manual override available below.
Layer 2 Per-Class Weight Overrides (Advanced) — different factor weights for forex vs indices vs crypto
Each asset class can have its own factor weight distribution (sum should equal 1.0 for clean baselines). Defaults are tuned to each class's liquidity dynamics. Changes are logged to
parameter_change_log. Layer 3 ML Model Status NOT_READY— gradient-boosting model trained on accumulated L2 shadow data
Training data progress0 / 10000 Off-Hours samples
Manual controls (advanced)
🧠 ML & Optimisation
ML Layer A — Trade Classifier SHADOW
XGBoost model predicting trade win probability from scanner snapshots. Trains on your journal data. NOT used in live trading until you explicitly enable it.
Data Readiness
Click "Check Status" to see data readiness.
Training
▸ Training History & Gate Eligibility
Loading…
Historical Backfill Engine
Replays scanner against historical MT5 candles to generate training data. 6 months across all 72 instruments typically produces 2000–5000+ snapshots.
Idle
Window: H1 bars of context per evaluation (50–500, rec 200). More = better indicator calc, slower. Step: Bars between evaluations (1–24, rec 4). Lower = more snapshots but slower. 1 = every hour, 4 = every 4h. Min Score: Minimum signal score to capture (0.0–3.0, rec 0.5). Lower = more data for ML. 0.0 captures everything with a direction. Lookahead: H1 bars to check for TP/SL outcome (5–50, rec 20). Longer = more wins hit TP but less realistic for day trading.
ML Layer B — Sequence Model (LSTM) SHADOW
Learns temporal patterns across sequences of market events (sweep → displacement → BOS → FVG → retest). Answers "what is the market doing next?" — complementary to Layer A's "should I trade this setup?". Requires PyTorch (
pip install torch). NOT used in live trading until you explicitly enable. MFE Extension adds a second model head that predicts the distribution of Maximum Favourable Excursion so TP1/TP2 can eventually become data-driven. Full ML Backfill (recommended on first deploy / after long downtime)
Runs Layer B scanner-replay (paper_trades snapshots feeding Layer A context), multi-timeframe event-stream detection (M5/M15/H1/H4/D1 across all instruments →
When to run: first deploy on a new VPS, or after ≥ 1 week of bot downtime. Safe to run while the bot trades — uses
Requires: MT5 connected (scanner replay + MFE both pull historical candles via
Failure mode: each sub-step is isolated. If MFE backfill fails, the preceding stages still wrote their data; re-run later. Individual per-instrument errors are logged but never abort the whole job.
Cancel: click Cancel on the row in the Background Jobs panel. Orchestrator checks cooperative-cancel between sub-steps and inside each inner loop.
All individual backfill buttons below still work if you want to run just one sub-step.
event_stream for LSTM sequences), MFE / true-MFE / MAE backfill (24h post-close window for losers — Principle 8 self-bias correction), and finally a Layer A feature-CSV refresh — all in one orchestrated background job. When to run: first deploy on a new VPS, or after ≥ 1 week of bot downtime. Safe to run while the bot trades — uses
job_runner, polled via /api/jobs/<id>. Typical runtime 20–60 min depending on months + instrument count. Requires: MT5 connected (scanner replay + MFE both pull historical candles via
copy_rates_range). Pandas + PyTorch not required for the backfill itself — only for subsequent Layer B training. Failure mode: each sub-step is isolated. If MFE backfill fails, the preceding stages still wrote their data; re-run later. Individual per-instrument errors are logged but never abort the whole job.
Cancel: click Cancel on the row in the Background Jobs panel. Orchestrator checks cooperative-cancel between sub-steps and inside each inner loop.
All individual backfill buttons below still work if you want to run just one sub-step.
Last run: —
Operational · Train / Predict / Diagnostics
Accuracy expectations as data grows:
• Below 10k sequences — model is immature, accuracy noisy
• 20k sequences — expect plateau around low-to-mid 80s
• 50k sequences — expect plateau around mid-to-high 80s
• 100k+ sequences — plateau holds; further gains require new features, not more data
Data Readiness
Click "Check Status" to see event counts.
Check Status: shows how many events have been logged, PyTorch version, and whether a model is trained. View Recent Events: pops up the last 30 events for an instrument — useful for debugging what the scanner is detecting.
Training & Live Inference
Train Layer B Model: trains the LSTM on all accumulated event sequences using the hyperparameters below. Takes a few minutes on CPU. Safe to run anytime — replaces the existing model on success, leaves old one untouched on failure. Predict Current Sequence: runs the trained model against the latest 20 events for a chosen instrument and returns phase prediction + continuation probability. Model Diagnostics: runs the trained model on a sample of historical sequences, reports label distribution, naive-baseline accuracy, per-class precision/recall, and confusion matrix. Tells you whether the model is learning real signal or just predicting the majority class.
Training thresholds: 500+ sequences minimum, 10,000+ for a usable model, 100,000+ for stable production use.
Multi-Timeframe Event Backfill (Build 12)
Replays historical candles through the event detectors on M5, H1, H4 and D1 timeframes. Expected outcome: 10k events → 100k–500k events in one operation, dramatically expanding Layer B's training data. Scanner is paused during backfill to avoid DB lock contention. Uses the cached MT5 candle data — no extra API calls.
Larger = fewer events, faster
Clean Regime Flapping: pre-v5.8 the regime_change detector had no hysteresis and would log every classifier flip, producing thousands of spurious events when ADX hovered near thresholds. Click this to purge any regime_change events logged within 30 minutes of a prior one on the same instrument+timeframe. The first click runs a dry-run preview. Safe to run anytime.
Run Diagnostics: evaluates the trained Layer B model and reports label distribution, naive baseline accuracy (always predict majority class), model accuracy, per-class precision/recall/f1, and the confusion matrix. Use this to sanity-check that the model's accuracy is genuine signal, not just an artifact of class imbalance. Takes ~1-2 minutes on a 5000-sequence sample.
Run Diagnostics: evaluates the trained Layer B model and reports label distribution, naive baseline accuracy (always predict majority class), model accuracy, per-class precision/recall/f1, and the confusion matrix. Use this to sanity-check that the model's accuracy is genuine signal, not just an artifact of class imbalance. Takes ~1-2 minutes on a 5000-sequence sample.
Live Inference Gate (Auto-Trade Integration)
What does "inert" mean? When the gate is OFF, Layer B's LSTM is never loaded and never runs during live trading. No predictions, no blocking, no influence on auto-trade decisions whatsoever — the code path is skipped entirely. Event logging and training still work independently. You can turn the gate ON only after you've trained a model and want to test it.
Range: 50–90. Default: 65. Minimum probability the market will continue in the scanner's proposed direction. Higher = stricter (fewer trades, higher quality). Lower = more permissive.
Which market phases allow trading. "Any" = no phase filtering. "Not uncertain" blocks only when the model is unclear. "Trending only" is strictest — only allows trades during clear trends.
⟡ ML Layer B — MFE Model (Staged Rollout)
Stage: — Distribution heads for data-driven TP1/TP2. Backend auto-advances stages once each criterion is met — no operator decision burden.
Loading MFE status…
Stage 1
MFE Backfill
—
Stage 2
Model Heads
—
Stage 3
Shadow Mode
—
Stage 4
TP Display
—
Stage 5
Auto-Use TPs
—
About ML Layer B staged rollout
Layer B predicts the distribution of Maximum Favourable Excursion (MFE) for each setup. Once shadow-mode validation confirms calibration is healthy, TP suggestions become data-driven — derived from how similar historical trades actually ran, not from static R:R multipliers.
Stage 1 — MFE Backfill: walks every closed trade, computes observed MFE + bias-corrected true MFE (24h post-close window for losers). Idempotent.
Stage 2 — Model Heads: retrains Layer B with mean+std MFE heads using Gaussian NLL loss. Auto-enabled when backfill coverage > 95%.
Stage 3 — Shadow Mode: auto-trades log Layer B's suggested TPs. Trades still use scanner TPs. Auto-enabled at Stage 2 accuracy threshold.
Stage 4 — TP Display: scanner/calculator panels show suggested TPs alongside scanner's. Auto-enabled after 2+ weeks shadow data.
Stage 5 — Auto-Use TPs: auto-trades use Layer B's suggested TPs. Auto-enabled only after 4+ weeks favourable calibration.
Stage 1 — MFE Backfill: walks every closed trade, computes observed MFE + bias-corrected true MFE (24h post-close window for losers). Idempotent.
Stage 2 — Model Heads: retrains Layer B with mean+std MFE heads using Gaussian NLL loss. Auto-enabled when backfill coverage > 95%.
Stage 3 — Shadow Mode: auto-trades log Layer B's suggested TPs. Trades still use scanner TPs. Auto-enabled at Stage 2 accuracy threshold.
Stage 4 — TP Display: scanner/calculator panels show suggested TPs alongside scanner's. Auto-enabled after 2+ weeks shadow data.
Stage 5 — Auto-Use TPs: auto-trades use Layer B's suggested TPs. Auto-enabled only after 4+ weeks favourable calibration.
Admin — manual ops
Force-stage-advancement (overrides auto-advance)
Optimiser Instrument Profiles
Save and recall named sets of instruments for the Parameter Optimiser. Profiles persist across restarts.
Active: none
Parameter Optimiser ADVANCED
Grid-searches RSI / BB / ATR / EMA parameters per instrument using 5yr historical data.
80/20 walk-forward split. Auto-locks validated edges (WFA stable or insensitive params). Degraded instruments unlock and rebuild automatically.
⚠ Requires historical data import first. Select instruments below to run a targeted rebuild.
80/20 walk-forward split. Auto-locks validated edges (WFA stable or insensitive params). Degraded instruments unlock and rebuild automatically.
⚠ Requires historical data import first. Select instruments below to run a targeted rebuild.
Optimised
—
instruments
Last Run
Never
Duration
—
seconds
Instrument Selector
Loading instruments…
0 selected
WFA Status Dashboard
Historical Data Import
Drop MT5 CSV exports into
Supports H1 and H4 exports from the BrandycandyExport script (2019–present).
Data is used by the Parameter Optimiser (the Parameter Optimiser) for statistically robust backtesting.
brandycandy_fixed/historical/ then click Import.Supports H1 and H4 exports from the BrandycandyExport script (2019–present).
Data is used by the Parameter Optimiser (the Parameter Optimiser) for statistically robust backtesting.
Total Rows
—
Instruments
—
DB Size
—
CSV Files Ready
—
ML Layer C — RL Trailing Agent DATA-LOGGING
Pure-torch PPO agent for trailing/exit decisions. Operates within a constrained risk envelope — never sets risk per trade, lot size, initial SL, or any system-wide rule. Action space:
Staged rollout — nothing auto-enables:
Mode guide — what each mode means:
HOLD / MOVE_SL_TO_BE / LOCK_PROFIT / FULL_EXIT. Staged rollout — nothing auto-enables:
- off — no RL infrastructure runs. Rule-based trailing only.
- data_only (v5.15 mode) — Phase A.
layer_c_decisionsaccumulates. No RL inference. Target: ≥ 1,500 rows withreward_realizedpopulated before training. - Train model — press "Train Layer C RL" (below). Runs offline PPO on logged decisions, writes
models/layer_c_v1.pt. - shadow — agent runs alongside rule-based on every monitor cycle. Recommendations logged to
layer_c_rl_recommendations, but the rule-based action is what fires. Accumulate 4+ weeks of data. - Compare shadow vs rule — table below shows avg account-% delta per trade: rule-based vs agent-counterfactual. Ship only when agent beats rule-based for ≥ 4 weeks.
- active — in the
early_trailhook only, the agent's action overrides the rule-basedNONEdecision (subject to safety veto). Other hooks (sl_trail,tp1_hits) stay rule-based — agent logs but never drives them.
Mode guide — what each mode means:
- off — zero impact. No logging, no inference. Use to fully disable.
- data_only — Requires: nothing. Safety: zero trading impact. Failure looks like: can't fail — it's just INSERTs into a log table.
- shadow — Requires: model file exists AND ≥ 1,500 decisions training data. Safety: agent action logged but NEVER executed. Failure looks like: shadow-comparison row below shows agent underperforming rule-based — retrain, don't promote.
- active — Requires: 4+ weeks of favourable shadow data. Safety layer enforced: (1) never widens SL, (2) no FULL_EXIT in first N min, (3) defers on high Layer B uncertainty, (4) no FULL_EXIT before 0.1R MFE. Vetoed proposals fall back to rule-based. Failure looks like: realised R lower than shadow-mode simulation suggested — flip back to shadow.
Loading Layer C RL status…
Mode
Phase A: set mode to
RL agent always inherits this mode (one source of truth).
data_only and check master. Logs every trail decision. Target: 1,000+ rows before offline training. RL agent always inherits this mode (one source of truth).
Reward Function
Reward weight for SL ratcheting into profit. Higher = more aggressive locking in. 0.3 default is balanced.
MFE prediction must drop to this × entry prediction before the time penalty fires. Lower = more tolerant of consolidation.
Penalty per hour on HOLD when thesis has deteriorated. 0.001 = -0.001% per hour. Stops the agent from sitting in dead trades.
Safety Layer
When agent picks LOCK_PROFIT, raise SL by this × SL_dist above current SL. 0.5 = half-risk into profit.
Safety: block FULL_EXIT in the first N minutes of a trade. Prevents panic-close on post-entry noise.
Safety: if Layer B's MFE std exceeds this, defer LOCK_PROFIT / FULL_EXIT to rule-based. High std = uncertain prediction shouldn't drive big decisions.
Training
Runs offline PPO on the
Action distribution in training data (shown after training) is important: if 95% of rows are HOLD, the model will just predict HOLD — that's a data-balance issue, not a model issue. Let more trades close before retraining.
layer_c_decisions table. Requires ≥ v521_rl_training_min_decisions rows with reward_realized populated. Training takes 30-90 seconds for a few thousand rows. Writes to models/layer_c_v1.pt. Subsequent shadow/active mode picks up the new file on its next cache refresh (≤ 60s). Action distribution in training data (shown after training) is important: if 95% of rows are HOLD, the model will just predict HOLD — that's a data-balance issue, not a model issue. Let more trades close before retraining.
v5.22 — P8 Active-Mode Hook Widening 3 hooks · expand for details
⚠ Never enable all three at once — promote ONE at a time, observe for 2+ weeks, then consider the next.
Hook 1 — Early Trail → BE
why?
Rule fires TRAIL_TO_BE at ≥ 1R unrealised. ON lets agent choose HOLD / LOCK_PROFIT / FULL_EXIT instead. Enable when shadow replay shows agent HOLD/LOCK consistently outperforms forced-BE across 20+ episodes.
Hook 2 — SL Structure Trail
why?
Rule fires TRAIL_STRUCTURE at qualifying swing levels. ON lets agent choose HOLD / MOVE_SL_TO_BE (only if tighter) / FULL_EXIT. Enable when whipsaws show in shadow replay.
Hook 3 — TP1 Partial-Close
why?
Rule fires TP1_PARTIAL (50% close at TP1). ON lets agent HOLD (full ride) or FULL_EXIT. Enable when shadow replay shows agent decisions consistently beat the 50%-runner pattern.
v5.22 — P9 VWAP-Split Execution
—
What this does: when an auto-trade would place a single large limit order, this feature splits it into N child limit orders at VWAP-spaced prices (centered on the scanner's entry price). Children are placed progressively deeper into the expected pullback — on LONG they walk DOWN from entry, on SHORT they walk UP. Reduces slippage impact on larger lot sizes.
When to enable: rarely needed below 0.3 lots (single orders fill cleanly). Most valuable at 0.6+ lots on 150k-scale accounts. At prop-scale (0.1 lots), enable in test_mode to VALIDATE the split math and broker acceptance before it matters financially. Leave off entirely unless you're actively validating or scaling up.
Requirements: (1) auto-trade must be firing limit orders, not market — so Priority 4 (Limit-Order-Only Mode) should be ON. (2) Scanner entry must be a real limit level, not a market-chase. (3) Broker (GetLeveraged / BlackBull) must accept 2–5 simultaneous limit orders on the same symbol. Phase 1 test mode validates this without risk. (4) Account balance must be BELOW the cap set below — above the cap, splits are suppressed as a safety scope.
Effect OFF: single limit order fires at scanner entry. Existing v5.17 / v5.22 P4 behaviour unchanged.
Effect ON + test_mode ON: system computes what the N-child split WOULD have been, logs it, increments the shadow counter. Still fires the single original order. Zero risk.
Effect ON + test_mode OFF: single order is replaced by N children. Each child is a limit order at a VWAP-spaced price, with lots summing to the original size (residue lands on the last child). If any child fails to place, already-filled children are rollback-closed.
Failure mode: if the split math throws or any child placement fails, rollback attempts to close any filled children. On rollback failure, trade remains in partial-fill state — your reconciler will tag it on the next cycle, but MONITOR the error counter. Non-zero error count = investigate broker logs before continuing.
4-phase rollout (all via settings below):
1. Enable master + keep test_mode ON for 1–2 weeks. Verify shadow counter incrementing.
2. Uncheck test_mode on prop-scale with min_lots=0.1, n_children=2. Watch error counter.
3. Raise to min_lots=0.3, n_children=3 once broker acceptance is confirmed.
4. Raise max_acc_balance past 150k + min_lots=0.6, n_children=3–5 for full-scale.
When to enable: rarely needed below 0.3 lots (single orders fill cleanly). Most valuable at 0.6+ lots on 150k-scale accounts. At prop-scale (0.1 lots), enable in test_mode to VALIDATE the split math and broker acceptance before it matters financially. Leave off entirely unless you're actively validating or scaling up.
Requirements: (1) auto-trade must be firing limit orders, not market — so Priority 4 (Limit-Order-Only Mode) should be ON. (2) Scanner entry must be a real limit level, not a market-chase. (3) Broker (GetLeveraged / BlackBull) must accept 2–5 simultaneous limit orders on the same symbol. Phase 1 test mode validates this without risk. (4) Account balance must be BELOW the cap set below — above the cap, splits are suppressed as a safety scope.
Effect OFF: single limit order fires at scanner entry. Existing v5.17 / v5.22 P4 behaviour unchanged.
Effect ON + test_mode ON: system computes what the N-child split WOULD have been, logs it, increments the shadow counter. Still fires the single original order. Zero risk.
Effect ON + test_mode OFF: single order is replaced by N children. Each child is a limit order at a VWAP-spaced price, with lots summing to the original size (residue lands on the last child). If any child fails to place, already-filled children are rollback-closed.
Failure mode: if the split math throws or any child placement fails, rollback attempts to close any filled children. On rollback failure, trade remains in partial-fill state — your reconciler will tag it on the next cycle, but MONITOR the error counter. Non-zero error count = investigate broker logs before continuing.
4-phase rollout (all via settings below):
1. Enable master + keep test_mode ON for 1–2 weeks. Verify shadow counter incrementing.
2. Uncheck test_mode on prop-scale with min_lots=0.1, n_children=2. Watch error counter.
3. Raise to min_lots=0.3, n_children=3 once broker acceptance is confirmed.
4. Raise max_acc_balance past 150k + min_lots=0.6, n_children=3–5 for full-scale.
Telemetry: the badge at top-right of this panel shows lifetime
live / shadow / err counts. Watch err — any non-zero value means at least one split attempt had partial-fill issues and may need manual broker investigation. ⟡ Reward Formula Statuscollapsed · auto-advances
Loading reward-formula status…
Stage 1 — Unified Reward
Status: —
Auto-enables when MFE model has 2+ weeks favourable calibration. New closes use the unified formula; historical rows wait for Stage 2.
Stage 2 — Retro Backfill
Status: —
Auto-fires 24h after Stage 1 is stable. One-shot rewrite of
reward_realized across closed rows. Training Data Diagnostics
Action Distribution
—
Reward Distribution
—
Admin — manual override
⟡ Shadow Replay Statuscollapsed · auto-triggers
Loading replay status…
Auto-trigger
Current state: —
Replay runs automatically once 4+ weeks of shadow decisions have accumulated, then weekly thereafter as new shadow data arrives. Defaults: M5 timeframe, 0.5-pip slippage. Replayed rows are idempotent.
Comparison loads after first replay run.
Admin — force-run replay
🔔 Integrations & Alerts
🌐 MACRO DATA APIS (J6)
External feeds for macro fields the broker doesn't subscribe (DXY/VIX/indices, US Treasury yields). Computed proxies fall back when keys missing.
Free with registration at fred.stlouisfed.org/docs/api/api_key.html. Used for us_10y_yield, us_2y_yield, yield_curve_spread.
Free tier (800 calls/day) at twelvedata.com/pricing. Used for DXY, VIX, US500, DE40, JP225 fallback.
⟡ OPERATIONAL ALERTS
Operator-supervision emails: critical bot problems (always on) and configurable state summaries. Uses a dedicated Gmail account with App Password (not your main Gmail). Generate app password here ↗
Bot Problem Alerts
ALWAYS ON Immediate email on critical operator-attention events: MT5 disconnect · Flask crash · watchdog restart failure · DB errors · scanner stall >10min · auto-trade unexpectedly disabled · critical exceptions. Not queued, not throttled.
Last problem alert: —
State Summary Emails
Scheduled supervision summaries: P&L, balance per account, DD status, session performance, open positions, recent auto-promotions, anomalies. Markdown-formatted.
Next scheduled summary: —
Phase Auto-Activation Alerts
Email the operator when a phase / layer transitions from shadow to active automatically (data-volume threshold + performance criteria met). The promotion is delayed 1 hour after the email so you can override.
🤖 Claude Integration — Budget, Features, Summaries
Central control for all Claude-powered features. Monthly spend cap protects against runaway costs. Every feature can be toggled independently. Summaries land in your inbox, the in-app notification feed, or both.
Monthly Budget
Loading…
Feature Toggles
Summary Cadence
Tip: Haiku costs roughly $0.01 per summary · Sonnet ~$0.05 · Opus ~$0.25. At $20/mo cap, you can send a Haiku daily summary ~2,000 times. Overkill for one person — defaults are conservative on purpose.
📰 Live News Feed (Auto-active) —
Live ForexFactory economic calendar. Auto-cached hourly. Blocks scanner signals and auto-trades within 30 min of high/medium impact events. Active automatically — no config needed.
Loading…
⚡ Auto-Trading LIVE MONEY
⚠ Auto-trading places real orders on your MT5 account. All 15 safety gates must pass before any trade fires: compound event (A4) + confluence ≥ threshold + ensemble agree + strategy validated (SP-4) + news clear (P9) + kill zone active + daily DD below hard stop + cooldown clear + no open trade. Start with the smallest account (160989) and low risk %.
Records setups without placing real trades. Generates ML snapshots at full signal frequency.
Auto-Trade Main Settings
Range: 0.5–3.0% · Auto-trading halts for the day if account DD hits this. GetLeveraged daily limit is 3%, so keep this well below. Conservative: 1.0% · Moderate: 1.5% · Aggressive: 2.5%
Range: 0.1–2.0% · Position size per trade as % of account balance. Lower = more trades before DD limit. Higher = faster target but riskier. Safe: 0.25–0.5% · Standard: 0.5–1.0% · Aggressive: 1.0–2.0%
Range: 15–480 min · Time before same instrument can trigger again. Prevents overtrading on choppy price action. Patient: 120–240 min · Standard: 60 min · Active: 15–30 min
Unfilled limit/stop orders auto-cancelled after this window. Logged in auto-trade log.
V5.14 Risk Caps & Circuit Breakers
Total across ALL accounts
Per single account
Total open R × risk % (default 2% = matches daily loss)
Total across all accounts (default 6% = matches max DD)
H5 also enforced: per-instrument dedup across ALL accounts (never 2 positions on same symbol, regardless of account). Atomic place-lock prevents race conditions that bypassed the pre-v5.14 cap.
Circuit Breakers ALWAYS ON (Phase C)
C1 — Consecutive-loss kill switch
N auto-placed losses in a row → disable (manual re-enable)
C2 — Daily loss approach
% of daily loss used → auto-disable until UTC 20:00
Automation Mode
Strategy Thresholds (Base Score)
Base scores are multiplied by the mode multiplier: Testing ×0.67 (lowered thresholds), Semi ×1.17, Full ×1.33. Lower thresholds = more signals but lower average quality. Higher = fewer but more confident entries. The scanner scores strategies 0–10 based on confluence factors.
Range: 2.0–7.0 · Full AMD chain (sweep→BOS→FVG). Requires highest confluence. Tight: 4.0–5.0 · Standard: 3.0 · Loose: 2.0–2.5 (more signals, lower win rate)
Range: 1.5–7.0 · Momentum breakouts with structure confirmation. Tends to have wider SLs. Tight: 3.0–4.0 · Standard: 2.0 · Loose: 1.5
Range: 1.5–7.0 · Counter-trend fades at extremes. Higher risk strategy — keep threshold elevated. Tight: 3.5–5.0 · Standard: 2.5 · Loose: 1.5–2.0
Context Filters
× typical spread
Advanced Toggles
Conservative 70%+ · Fewer trades, higher quality
Standard 60–65% · Balanced — recommended starting point
Aggressive 50–55% · More trades, lower selectivity
Standard 60–65% · Balanced — recommended starting point
Aggressive 50–55% · More trades, lower selectivity
⚠ Each selected account will receive its own copy-trade simultaneously. Per-account DD checks still apply. Start with 160989 only until confirmed working.
Loading accounts…
⚡ Execute Surface (J1)
Selects which surface the top-bar ⚡ button opens. Both surfaces use the SAME backend endpoints (
/api/execute/place, /api/scalp/open) — only the chrome differs. Default v1 while v2 is in soak. 📊 Bot Trade Performance
📊 BOT TRADE PERFORMANCE
Click Refresh to load stats…
🧪 Force Test / Super Test
🧪 Force Test — bypasses all gates, fires 0.01 lots
🚀 SUPER TEST — 15 min paper-only stress test
Drops all thresholds to 0.5, enables partial setups (N-1 conditions), disables session/regime/spread filters, forces paper mode. Proves the full pipeline works. All open paper trades closed on expiry.
Recent Auto-Trade Log
No auto-trades yet.
🤖 Recently Auto-Enabled —
Features that self-enable when readiness criteria are met (e.g. Layer B MFE at 500+ shadow rows, Layer C RL trained). Checks run every ~6 hours automatically.
Criteria readiness
Loading…
Recent promotions
No auto-promotions recorded yet.
🎯 MFE Model Shadow Predictions —
Shadow-mode predictions from the v5.19 MFE model (phase D activated). Predictions are logged on every trade open but never change placed TPs. Auto-promotes to active once calibration passes.
—
Total predictions
—
Resolved (of 500)
—
Mean |err| R (<0.5)
—
Promotion status
—
🎯 Gate Block Summary —
Latest scan's qualifications, blocks by gate, AMD stage & Tier distribution (SMC_AMD only — other strategies use different models), and per-strategy activity.
—
Scanned
—
Qualified
—
—
Executed
—
Q → E Rate
—
—
Last Scan
Blocks this scan —
Loading…
AMD Stage distribution (SMC_AMD only)
Loading…
Tier distribution (SMC_AMD confluence grading)
Loading…
Per-strategy activity (why each strategy is/isn't firing)
| Strategy | Qualified | Executed | Blocked | Primary block reason |
|---|---|---|---|---|
| Loading… | ||||
Recent block events (last 20)
Loading…
Bot Trade Performance v5.22
Build 11 v5.22 — Priority 7: Meta-Strategy Allocator (Advisory)
Bot Trade Performance — v5.22
What this does: groups realised trade performance by
Advisory only: this panel never writes to settings or adjusts any weight. Read and act manually. Cells with fewer than
Buckets: ≤25k (small eval), 25–50k, 50–100k, >100k (funded-scale). Matches your current 10k/25k/100k/150k mix.
strategy × account_size_bucket × instrument over a rolling window. Ranks by average R-multiple. Use this to decide which strategies or instruments to manually enable/disable in the Strategy tab.Advisory only: this panel never writes to settings or adjusts any weight. Read and act manually. Cells with fewer than
min_trades samples are filtered to avoid noise.Buckets: ≤25k (small eval), 25–50k, 50–100k, >100k (funded-scale). Matches your current 10k/25k/100k/150k mix.
Press "Generate report" to load.
Paper Performance (Rolling 30-day) SHADOW
Live (30-day)
Loading…
Shadow (30-day)
Loading…
🧠 Layer C Model Management (J4)
Trained models from
layer_c_train_model.py (PC-side) land here. Imported models default to data_only (no influence on trade management). Promote to shadow to log agent recommendations alongside rule-based actions; promote to active only after J5 shadow validation criteria met. ACTIVE MODEL
Loading…
IMPORTED MODELS
Loading…
SHADOW VALIDATION (J5)
Click Refresh to load metrics.
IMPORT NEW MODEL
Upload the
.zip + .json pair from your PC's ./trained_models/ directory.∿ Observability
Observability
Last refresh: never
Health ranges● SCR 20–40% healthy● DFE ≥60% strong● BCR 10–25% healthy■ SMC/AMD ■ Breakout ■ MeanRev
TP / SL Source Breakdown
Auto-placed closed trades over the window. Green = structural target, amber = R:R fallback.
Click ⟳ Refresh to load breakdown.
Live Counters (in-memory · resets on restart)
Click ⟳ Live to load…
CONFIGURATION
Date range
Strategy selector toggle which strategies participate in this run
Symbols
loading…
Risk
Strategy risk overrides
| Strategy | Min score | Live score | Risk % | Live risk |
|---|---|---|---|---|
| SMC_AMD | — | — | ||
| Breakout_Continuation | — | — | ||
| Mean_Reversion_Trap | — | — |
SL / TP multipliers (per instrument class) ×ATR — mirrors live atr_mult_* keys
| Instrument | SL × ATR | Live SL | TP × ATR | Live TP |
|---|---|---|---|---|
| forex | — | — | ||
| xauusd (metals) | — | — | ||
| index | — | — | ||
| oil | — | — | ||
| crypto | — | — |
Account mix
| Account size | Count |
|---|---|
| 10K | |
| 25K | |
| 50K | |
| 150K |
VPS capacity (Cloud VPS 40, 48GB RAM): ~5 concurrent accounts × 5 symbols = 25 instances max. Heavier configurations may slow execution or OOM. Typical 5-year run per account × symbol: 20–40 minutes.
Circuit breakers
Gate toggles
Advanced
Strategy Relaxation (Backtest Only)
Backtest Only. These toggles relax strategy qualification rules for the backtest run only. They do not affect the live bot. Use to test “what if strategies fired more often?” without committing to live changes. All default OFF = strict live-matching behaviour.
live: SMC 3.0 · BRK 2.0 · MRV 2.5 · Asia 1.5
1 = near-qualified setups · 2 = very permissive
live: displacement required · test: displacement scoring only
RUN HISTORY
| Timestamp | Symbols | Range | Trades | WR | P&L | Max DD | Duration |
|---|