← Todos os guias

Teaching example — from idea to paper bot

Atualizado: 2026-08-14

Teaching example — from idea to paper bot

Let’s walk the full cycle on a simple idea: buy UP on BTC 15-minute contracts when spot is in a short uptrend.

The example’s numbers are illustrative teaching values: realistic, but not a promise of returns. Yours will differ — and most first ideas get rejected by the backtester. That’s normal: every idea killed on history in 30 seconds is money you did not lose on the exchange.

Building the strategy

Card Setting Why
Market BTC, 15m Most data — fastest statistics
Position size Fixed $ = 50, Max positions = 1 $50 of the $1,000 starting capital = 5% per trade; comfortably above the 5-share exchange minimum
Entry (UP), ALL MACD histogram (12/26/9) > 0 and EMA distance % (20) > 0 histogram > 0 = MACD above its signal line (upward momentum); EMA distance > 0 = price above EMA-20 (uptrend confirmed)
Exit Take-profit price_up = 0.75, Stop-loss price_up = 0.30 TP/SL are absolute contract prices, not percentages
Entry time window 10–60% Skip the chaotic start and the hopeless end
Context filters Max spread % = 10 A wide spread eats the edge
Circuit breakers Max drawdown stop = 20% The safety fuse

Save as “Trend filter BTC 15m”, run on 14 days.

First run: a profit proves nothing yet

Result: +$74 (+7.4%), 96 trades, win rate 58.3%, profit factor 1.42, drawdown 6.8%. Tempting to build a bot right away. Check the Significance strip first: edge/trade +0.9 ± 1.2 pp — the interval touches zero; “Trades needed: ~380 of 96”; PSR 84% (the confidence bar is 90%). Translation: encouraging, but 96 trades cannot separate skill from luck. Short-window profitability is always deceptive.

The right move — don’t tune parameters, lengthen the window: the Restart panel, same config, 60 days.

Second run: enough statistics

+$233 (+23.3%), 421 trades, PF 1.36, drawdown 9.4%, edge +1.0 ± 0.55 pp (the interval is fully positive), more trades than “needed” (~380), PSR 93%. Note: the edge barely changed — the confidence in it changed. Metrics cooled slightly (PF 1.42 → 1.36) — that’s typical on longer windows.

Validation: Monte Carlo — profitable 96%, fragility 8% → robust; order-shuffle — percentile 62 → normal; p = 0.02 → SIGNIFICANT. DSR 91%, and a control run on a different window keeps the edge’s sign. The ladder is passed.

Polish via Analytics — then paper

Entry-price calibration shows the edge’s structure: the 0.30–0.50 bucket is +2.4 pp above break-even (that’s where the edge lives), 0.50–0.70 is near zero, and 0.70–0.85 entries are −1.9 pp below break-even. One targeted change — the condition price_up < 0.70 — and a third run yields +26.2%, PF 1.51, drawdown 7.1%. The Compare panel will highlight exactly one changed parameter.

Now the rocket button: “Create paper bot”. The backtest proved the past; paper checks the present.

What the example taught. Build → first profit but statistically unproven → lengthen the window instead of twisting knobs → pass significance and validation → find where the edge lives in calibration → one targeted fix → paper. The order is the same for any idea. And remember: most cycles honestly end with “no edge, bury the idea” — that’s a win too, and it cost you zero.