D
DAAVILE Algo Trading
THE BOT · MATHEMATICAL EXECUTION & MODELS

THE BOT,
AND HOW IT EARNS ITS PLACE

What it does · How I test it · How I decide what runs live

1,500
Verification Tests
3
Conditions Per Period
360
Mutation Tests
500
Periods, 2004-2026
13
MT5 Test Terminals
4
Proofs Per Test
THE BOT · QUANT EXECUTION 20+ YRS PROVEN

The Algorithmic Engine & Model Fleet

Our battle-tested, non-custodial trading robots engineered for Gold (XAUUSD) and global liquidity. Runs 24/7 on a private cloud VPS directly inside your personal regulated broker account.

840
Logic Directions
169K+
Config Inputs
3
Engines (A-B-C)
XGBoost
Model Fleet
✓
Signal Pipeline: Microstructure tick ingestion to live institutional execution.
✓
7-Level Trailing & Dynamic Exits: Real-time volatility trailing and partial profit banking.
✓
Hard Equity Guard: Account-level circuit breakers, drawdown locks, and news session pauses.
✓
Robustness Lab: 1,500 journal-proved tests on real gold history — every period run under three conditions.
✓
Agentic Research Floor: Multi-model LLM fleets analyzing trade logs and calibrating presets.
Run the Robustness Lab ↓

Pipeline | Tick to Position

Signal Pipeline


01SCAN21 logics read the market
02FILTERRisk, session, news gates
03TRIGGERImmediate, bars, time, pips
04MANAGETrail, trims, hedge, reverse
05EXITSingle stop or basket close

Plate 01 | Core Engine

The Feature Matrix


Five modules. Select one to inspect its spec sheet.

Advanced Trailing

Level 7 Trail

2,680 2,665 2,650 2,635 T0: ENTRY L1: B/E L3: 40% L5: TIGHT L7: PIN EXIT ENTRY: 1.00 LOT BUY L5 +75pts L7 PIN +120p STOP HIT +140 PTS HARVEST FIG. 1.1 // LEVEL 7 TRAILING ENGINE MODE: BASKET DYNAMIC
Fig. 1.1Schematic - 7-Stage Trailing Stop Floor ArchitectureScale NTS
ProgressionStep 1 to 7
FormatsPoints / Avg%
ModeAuto / Manual

Basket-aware trailing that raises the floor under winners in 7 steps. Avg% for market-relative management, points for hard precision.

Advanced Trailing

Seven steps, two formats. Gains protected without choking the move.

Level 7 Trail

Partial Closes

Trim on milestones. Edge compounds, exposure falls.

Dynamic Trimming

Risk Modules

Daily caps, equity guard, lot throttling on margin health.

Equity Guard

Time and News Filters

Session windows plus macro pause and resume. No chaos trading.

Session Sovereignty

Prop-Firm Tooling

Daily and total drawdown caps, stealth execution, multi-account mirror.

Evaluation Rails

Multi-Asset and Market

Forex, crypto, stocks, commodities. MT4, MT5, Rust terminals.

Cross-Platform

Plate 02 | Grid Doctrine

The Core Grid Engine


Non-predictive by design. Noise cannot be forecast; mean reversion, exhaustion and volatility expansion can be measured. The engine buys dips in small steps instead of one big bet.

01

Counter-Trend Edge

2,6602,6452,6302,615 B/E PULLED TO: $2,626.50 L1: 0.05L BUY L2: 0.08L BUY L3: 0.12L BUY L4: 0.18L BUY ROTATION EXIT ABSORPTION RATIO TOTAL VOL: 0.43L EXPANSIONLADDER FILLEXHAUSTIONPROFIT FIG. 2.1 // GRID ABSORPTION LADDER MEAN REVERSION
Fig. 2.1Schematic - Counter-Trend Ladder & Break-Even CompressionScale NTS

Absorbs expansion liquidity, profits on pullback and rotation.

PhilosophyAbsorption

02

Structured Progression

HARD CEILING: 1.50 LOT EXPOSURE CAP 0.05L +20 pts 0.10L +32 pts 0.20L +50 pts 0.35L +75 pts 0.50L CLAMPED 1.6x1.6x1.5xMAX CAP STEP 1STEP 2STEP 3STEP 4STEP 5 FIG. 2.2 // STRUCTURED PROGRESSION & CEILINGS DETERMINISTIC CAP
Fig. 2.2Schematic - ATR Spacing & Hard Exposure Ceiling ClampingScale NTS

Spacing, ceilings and throttles cap exposure across 20 domains.

Risk CapDeterministic

03

Basket Life-Cycle Exits

01. OPEN GRID LOAD 4 Rungs 0.45L Vol 02. DRAG BE PULL -24 pips To Price 03. TRIM HARVEST 25% + 50% Risk: 0.0 04. TRAIL LEVEL 7 Pin Profit Runner 05. TOTAL RECYCLE MARGIN RELEASED -> IDLE WAIT ACCUMULATIONDRAG RECOVERYFLUSH & RECYCLE FIG. 2.3 // BASKET LIFECYCLE ENGINE CLOSED-LOOP STATE
Fig. 2.3Schematic - Basket Lifecycle Pipeline & Closed-Loop RecycleScale NTS

Trims and 7-stage trail drag break-even toward price.

ExitsTrail + Trims
Grid Behavior Modes

Precision Grid Orchestration

Counter-Trend (default)Adds on exhaustion
Dynamic HedgeOpposite scaling vs ref
Signal InversionFlip buy / sell by regime
Trend ProgressionPyramid verified breakouts
Dormant SentinelMonitor, no fills

Each entry recalculates the basket target, pulling the required exit closer to price. Capital spreads over 20 domains so no single swing concentrates margin.

Environment Builders Set
7-Step TrailingPoints / Avg%
Partial Closes4 variants
ProgressionCaps + throttles
Safe WindowsVolatility guard
Dynamic Positioning Set
Hedge Ref42 logic options
Hedge Scale% of ref lots
Tags[HEDGE] / [REV]
Robustness Lab See Plate 05

Fill noise, slippage, spread bursts, tick delays - edge verified before live capital. Full protocol in Plate 05.

Plate 02A | The Test Ladder

How a Setfile Earns Its Place


A setfile is only a list of numbers until it has survived a test. Every configuration goes through the same two lanes. First it fights the other configurations in a 360-test mutation pool, hunting for more profit and less drawdown. Then the survivor is put through 1,500 verification tests — 500 periods of real gold history, every one of them run three times under three different conditions. A test only counts when the tester report and the terminal journal agree to the cent.

Lane 1 | Mutation

New configurations are put in a pool together and made to earn their place against each other, on the same ranges and under the same three conditions. The only thing that decides the winner is the numbers: more profit, smaller drawdown.

Tests per setfile360
Periods covered120
Conditions3
Judged onProfit + max drawdown
LosersDropped, never retuned
Lane 2 | Verification

The winner gets the long test: the full historical pool, period after period, under all three conditions. This is not a friendly sample. It is the whole span, including the periods nobody would choose to show you.

Tests per candidate1,500
Periods covered500
History2004 → 2026
MarketGold, M15, real ticks
Account100,000 USD, 1:500
The Three Conditions

Every period is tested three times, and the three answers must agree. The third condition is deliberately unfair — that is the whole point of having it.

P1 — CleanNo delay, ideal fills
P2 — DelayFixed 150ms lag
P3 — Stress20% missed, 20pt shift
  plus20% of exits delayed
RuleAll three or it does not ship
The Receipt

A backtest that reports a number is not proof. The proof is the terminal's own journal, written while the test was running. A result only lands in the ledger when four things are in that journal and the arithmetic closes to the cent.

1Final balance
2Clean shutdown, deinit code 1
3Tick count
4Total time, login to stop
ThenDeposit + profit = journal balance
Missing any oneNot a result. Not reported.

deposit 100000.00 + profit -407.28 = 99592.72
== journal line, cent-exact · mdd 428.24 from report
24 trades · test ran 16.5s on T3

What a Decision Costs

This is the part nobody shows you. Choosing a setfile is not a click. It is thousands of machine hours, spread over days, and the answer only exists at the end of the last one.

Full verification pass1,500 tests
Calendar time~6 days, non-stop
Machine time~140 hours
Test fleet13 MT5 terminals, 3 machines
Tester time per testMedian 60s
Mutation wave~330 tests per 15 hours

Most of that calendar is queue, harvest and proof, not trading. The machine spends about a minute per test; the rest is the work of making sure the minute was real.

What the Benchmark Setfile Actually Did 500 periods · gold M15 · every-tick real ticks · 100,000 USD · 1:500

This is the current benchmark configuration measured across the full verification pool. I am showing the weakest condition first, because it is the one that decides whether it goes live.

P1 — Clean · no delay, ideal fills 444 / 500 periods green · 89%
P2 — Delay · fixed 150ms lag 446 / 500 periods green · 89%
P3 — Stress · 20% missed, 20pt shift, 20% late exits 364 / 500 periods green · 73%

The delay changes nothing. P1 and P2 land on the same answer, so the result does not depend on perfect execution timing.

The stress condition hurts. A quarter of the periods go red once entries are missed, the price shifts and exits are delayed. That is what a real broker does to you.

That is the number I read. Not the clean one. If P3 cannot hold, the configuration does not go live, no matter how good the first two look.

The Rule I Write Down Before The Run

Before the first test I write the thresholds down: the maximum drawdown I will accept, the profit I require, the tolerance for a rerun. The decision is made against that page, never against a number I saw afterwards.

ThresholdsWritten before, not after
One axis at a timeNo blended stress
Worst case, not averageThe harshest plausible test
Repeat checkSame run, different seed
DegradationMust worsen in proportion
Fail Means Discard, Not Tune

When a stress test blows the account, I do not adjust the stress until it survives. That is curve-fitting to your own bad case, and it produces a book that looks validated while teaching you nothing about the real risk.

A blow-upThe setfile is discarded
A strategy changeThen the whole matrix again
Tuning the stressNever allowed
Tested setfilesKept on disk forever

There is no way to reach the live account without going through this page. Not because the gate is clever, but because it was written before the answer was known.

SETFILE.SET MUTATION360 TESTS VERIFY1500 TESTS LIVEOR OUT THE THREE CONDITIONS — EVERY PERIOD, THREE TIMES P1P2P3 500 PERIODS × 3 CONDITIONS = 1,500 TESTS ALL GREEN OR OUT
Fig. 2A.1The test ladder: fight first, then verify, then decideScale NTS

The algorithm is the easy part. This is the part that decides whether it touches money. Everything above was produced on the local Linux environment: the terminals, the local brain, the sandbox and the virtual machines that keep a failed experiment from touching anything real.

Plate 03 | Survival Systems

Risk, Time, Compliance


Built to survive margin pressure, news spikes, thin sessions and evaluation rules.

Risk Fortress Cascade Intercept
VOLATILITY SHOCK Drawdown Surge GATE 01 DAILY -2.5% ACTION: Lot Throttle -50% Size Pass New: RESTRICTED DEFENSE L1 GATE 02 WEEKLY -5% ACTION: Dynamic Sell Hedge Freeze Net: DELTA ZERO DEFENSE L2 GATE 03 MAX -8.0% EMERGENCY: CLOSE ALL KILL BOT Prop Rule: PASS / SAVED HARD HALT DRAWDOWN DETECTIONCASCADE INTERCEPTZERO RUIN FIG. 3.1 // SURVIVAL RISK INTERCEPTOR ZERO ACCOUNT RUIN
Fig. 3.1Schematic - Multi-Tier Drawdown Gates & Emergency Kill-SwitchScale NTS
Loss LimitsDaily / Weekly / Monthly
Equity GuardDrawdown protection
Margin ThrottleAuto lot scaling
EmergencyStopEA / CloseAll
Time and News Filters Session Filter
00:0004:0008:0012:0016:0020:0024:00 ASIAN SESSION Tokyo / Syd (00-08 UTC) LONDON EXPANSION Frankfurt / Lon (07-16 UTC) NEW YORK SESSION Peak Liquidity (12:30-21) CPI / NFP SPIKE ±30m BUFFER LOCK 10 SESSION WINDOWS ZERO CHAOS TRADING SESSION FILTERMACRO PAUSERESUME TRADING FIG. 3.2 // 24H SESSION & NEWS CLOCK MACRO BLACKOUT
Fig. 3.2Schematic - 24-Hour Session Timeline & Macro News BlackoutScale NTS
Sessions10 windows
News ImpactLevels 1-3
BuffersBefore / After
PrioritySession first
Trigger Matrix Per-Logic
RAW SIGNAL LOGIC #14 Breakout Det. CONFIRMED 01. IMMEDIATE Instant Execution (0ms) 02. AFTER BARS Accum: 3 / Req: 5 Bars 03. AFTER MINUTES Timer: 12m / Req: 15m 04. AFTER PIPS Displacement: 18p / 25p ORDER DISPATCH 1.00 Lot COMMITTED STATE PERSISTENCE: REBOOT & CRASH RESILIENT FIG. 3.3 // TRIGGER MATRIX & STATE PERSISTENCE DETERMINISTIC GATES
Fig. 3.3Schematic - Multi-Condition State Gates & Memory PersistenceScale NTS
ImmediateInstant
AfterBarsWait X bars
AfterMinutesWait X minutes
AfterPipsWait X pips

Trigger state persists through restarts and session transitions. The system never forgets.

Evaluation Rails Prop Compliance

Hard algorithmic limits enforcing prop firm drawdown rules and equity integrity in real time with stealth low-friction execution.

CapsDaily / Total
ExecutionStealth, low friction
WatchdogReal-time equity
MirrorMulti-account sync

Hedge and Reverse Delta Neutral

Counter-exposure coupling that dynamically flips net bias or scales opposite lots on volatility breach.

HedgeOpposite from ref
ReverseFlip buy / sell
Scale% of ref lots
OverrideEngine A counter

Plate 04 | Proof, Not Promises

Backtesting and Robustness Lab


The algorithm is the hypothesis. The machine is the answer. The current verification lane is 1,500 journal-proved tests on real gold history, every one of them checked against the terminal's own journal to the cent, and a set of stress tests written down before the run that decide whether a configuration is allowed anywhere near a live account.

Cut A-A | Walk-Forward Windows (Model Fleet) Train -> Test, Rolling
TRAIN TEST ROLL OUT-OF-SAMPLE NEVER TRAINS THE MODEL

This figure is the model fleet's method, not the setfile verification above. In the 1,500-test lane nothing is trained and nothing is rolled: one fixed setfile runs across 500 fixed periods under three fixed conditions. What is trained is the oracle that reads those results and decides what is worth testing next.

01 | The Receipt, Not The Screenshot

A tester report is a claim. The terminal journal is the proof. Every result that lands carries the run ID, the terminal, the period, the condition, the profit, the drawdown and the verdict — plus the path to the journal line it came from. The ledger is append-only: a wrong result gets corrected in the open, never quietly rewritten.

RecordedRun ID, terminal, period, condition
Proof4 lines from the journal
ArithmeticDeposit + profit = balance, to the cent
CorrectionsWritten down, never erased
02 | The Whole History, Not The Good Part

500 periods of real gold history, from 2004 to 2026 — full years, quarters, months and weeks. The pool includes the periods that hurt, because a configuration that only survives the parts you choose to show is not a strategy. It is a picture.

Periods500
Span2004 → 2026
Period lengthOne week to one year
ModelledEvery-tick real ticks
Account100,000 USD, 1:500
03 | Four Ways A Grid Actually Dies

Instead of permuting every knob, I test the four failure modes that can genuinely kill a grid live: worse fills than the ideal tick price, missing entries when the broker requotes or disconnects, exits that do not realise their modelled result, and spread that suddenly widens. One axis at a time, so when something breaks I know exactly what broke it.

Fill costNoise + one-sided slippage
Missing entries10% and 30% of windows skipped
Exit qualityNoisy closes, delayed re-requests
Spread squeeze13x burst on news
RuleOne axis at a time
04 | The Test That Decides

The thresholds are written down before the run, and the answer is read against them afterwards. The binding test is the combined bad week: worse fills and worse exits together. It has to hold the drawdown budget and clear the profit floor, the damage has to be proportional rather than a cliff, and a rerun with a different seed has to land in the same place. If a stress test blows the account, the configuration is discarded — it is never tuned until it survives.

ThresholdsWritten before the first test
Binding testWorse fills + worse exits
DegradationProportional, not a cliff
Repeat checkSame run, different seed
Blow-upDiscard, never tune
05 | ML Oracle

The machine that reads the machine. Per-range surrogates predict profit, drawdown and profit factor before a burn; feature importance surfaces which of the EA's 42 logics drive outcomes; dead-knob detection kills wasted sweeps. Full fleet detail in Plate 04A. Bayesian optimization plus low-discrepancy mass-sweeps propose candidates; active learning ranks the next experiment by insight per compute dollar.

INPUT VECTOR 42 LOGIC KNOBS θ₁: ATR Multiplier θ₂: Trail Step Pips θ₃: Session Window θ₄₂: Vol Scale XGBOOST SURROGATE TREES: 250 | DEPTH: 4 GATE PASS [σ > 0.85] PROMOTE TO MT5 BURN EXP. SHARPE: 2.45 GATE DROP [σ < 0.40] PRUNE BEFORE RUN SAVED COMPUTE: $0.18 SHAP FEATURE IMPORTANCE // PREDICTIVE ATTRIBUTION ATR_Spacing_Step 34.8% Trailing_Stage_Step 25.4% Session_NY_Blackout 18.1% Chop_Band_Tolerance 11.6% FIG. 4.2 // ML ORACLE (PRE-BURN SURROGATE) XGB CLASSIFIER
Fig. 4.2Schematic - ML Oracle Pre-Burn Predictor & Feature RankingScale NTS
Reads42 internal logics
PredictsProfit / DD / PF pre-burn
SearchBayes + mass sweeps
06 | Agent Fleet Operations

A backtest factory, not a laptop with a terminal open. Parallel terminals driven through a typed control protocol, orchestrator manifests, campaign chunking and clean resume after mid-flight stops. One driver per manifest, orchestrated like a data center - not hobby scripts.

FLEET ORCHESTRATOR HUB MANIFEST: XAU_2024_SWEEP.YAML QUEUE: 1,420 JOBS DISPATCHED STATE: AUTO-RESUME ARMED MT5 NODE 01 RANGE 01-50 104K TICKS/S RAM: 1.2 GB MT5 NODE 02 RANGE 51-100 112K TICKS/S RAM: 1.3 GB MT5 NODE 03 MC STRESS 21x 98K TICKS/S RAM: 1.4 GB RUST ENGINE SIMD PARALLEL 1.8M TICKS/S RAM: 420 MB TELEMETRY INGEST & PARQUET LAKE STREAMING REAL-TIME METRICS // DRAWDOWN CURVES // TRADE LOGS SNAPSHOT FREQUENCY: 1.0 SEC // ZERO CORRUPTION GUARANTEE FIG. 4.1 // DISTRIBUTED AGENT FLEET FLEET TOPOLOGY
Fig. 4.1Schematic - Distributed Fleet Orchestrator & Parallel Terminal NodesScale NTS
TopologyParallel MT5 fleet
ResumeMid-campaign recovery
DisciplineOne driver per manifest
07 | Institutional Memory

The compounding asset. A structured knowledge base: full map of 42 logics across 20 groups, per-range learnings, distilled lessons queryable by agents, and champion doctrine. Explicitly built as training fuel for a future model - today it is the agents' shared memory; tomorrow it is the fine-tune.

Map42 logics / 20 groups
RecallRAG over lessons
TrajectoryMemory -> model

Plate 04A | Model Fleet

The Models Trading The Algorithm


The EA is not a black box - it is a 42-logic machine. A second machine reads the first one. Four gradient-boosted tree model systems (a fleet that includes XGBoost) sit between the algorithm and raw market history. The strongest result so far is blunt: the models proved some parameters do nothing, and we removed them from the search space. This is not "AI trading." This is machine learning as infrastructure - the EA trades; the ML decides what to test next.

Result | Dead-Knob Falsification Operational

The per-range surrogate scored every knob against baseline. On any range where the model cannot separate a setting from baseline, the parameter is dead - it does nothing. Those knobs were cut from the optimization search space. Falsifiable, concrete, and the reason wasted simulation cycles drop.

TestKnob vs baseline
ScopeAny range, fail = dead
ActionRemoved from search
01 | Regime-Eyes Panel In Production

XGBoost panel model: per logic, per market regime - who makes money where. The EA runs 42 independent logics across 20 engine groups. The map says which earn in a 2004-2015 squeeze, which die, which only work in modern tick regimes. Refreshed on every retrain.

LearnsLogic x regime -> edge
SurfaceWin map per retrain
RoleWhich logic earns where
02 | Trade Grader In The Lab

Meta-labeling in the Lopez de Prado pattern: not "does this strategy make money" but "does this exact trade right now make money." Trained on 20,522 real extracted deals; emits win-probability and magnitude per closing deal. The actual technique big-fund quants use - built on retail hardware. Proof-of-concept stage, labeled honestly.

Trained On20,522 real deals
EmitsP(win) + magnitude
PatternMeta-labeling (LdP)
03 | Cascade Watch In Development

Classifier for drawdown cascades before they happen: family concentration, unrealized pain, regime condition -> P(cascade next N bars). Early warning most retail stacks do not have. Still in development; shown as lab work, not as a live gate.

InputsConcentration + regime
OutputP(cascade, next N)
RolePre-cascade alarm
04 | Per-Range Surrogate Operational

Gradient-boosted trees from knob settings straight to profit, drawdown, and profit-factor per range - so simulation burns only on ideas that forecast well. Also the engine behind dead-knob detection. Agents call it daily through the MCP predict-range tool.

MapsKnobs -> profit / DD / PF
Side EffectDead knobs exposed
Call PathMCP predict-range
Cut B | Model Fleet Schematic History -> Models -> Decision
HISTORY 2004 - NOW REGIME-EYES TRADE GRADER CASCADE SURROGATE FLEET VOTE NEXT TEST EA DECISIONS GRADIENT-BOOSTED TREES INCLUDING XGBOOST | NOT AUTO-TRADING THE MODEL OUTPUT
FamilyGBT incl. XGBoost
LivePanel + surrogate
LabGrader + cascade
RuleML picks tests

Plate 04B | Agentic Floor

The Agentic Pipeline


One laptop. That is the whole stack. The rest is the same cloud and local LLMs everyone can rent - the difference is a factory floor. Agents read the same bootstrap doc, follow the same laws, append to the same ledger, and ask the same knowledge base before acting. Cloud models reason; local models recall. The pattern is not "agent generates code." Agents are the researchers; the backtester is the lab; the ledger is the truth.

Research Loop | Hypothesis to Gate

Agents form hypotheses, burn compute on evidence, reject their own intuition when the ledger disagrees, and hand institutional memory to successors in a format built for a future fine-tune. A fund has departments: research, backtesting, validation, domain expertise. This stack has lanes - the workflows are equally formal.

Shared ContextBootstrap + laws
TruthAppend-only ledger
RecallCloud reason / local RAG
MemoryLessons -> fine-tune fuel
Staged Promotion | Nothing Overrides Unilaterally
LadderClean -> latency -> MC -> cost -> OOS holdout
Truth TablesEra-separated + multiple-testing correction
GatesGo / no-go - agents and operator included
MCP | Five Senses

A custom MCP server gives every agent the same toolkit. Lessons are distilled from measured intervention outcomes - knock out logic X, watch range profit move - not vibes.

search_lessonsMeasured outcomes
predict_rangeSurrogate forecast
suggest_nextActive learning pick
query_runsUnified experiment table
constraintsStructural must-respect

The 42-logic algorithm trades gold. The system around it is the actual edge. Machine-learning infrastructure and agent lanes close the department gap a one-person shop would otherwise carry alone - without pretending the lab models are production when they are not.

The Lab Around The Bot

See the Quantum lab around the bot

The Quantum dashboard is the cockpit that watches this bot run — local LLM agent, IDE, and charting.

// Software lab RYIUK — local LLM inference, backtesting pipelines, agentic workflows. No signals. No courses.
RYIUK.pro →