⚗️ BUILD · BACKTEST · EXPORT · FREE

Strategy Lab

Build a trading strategy from honest building blocks, backtest it on six months of real 5-minute bars, then export to TradingView Pine Script. No signup. No affiliate links. No download. Just a browser tab.

1 Pick an instrument

NQ 5m · 60d
ES 5m · 60d
BTC 5m · 6mo
HYPE 5m · 6mo
NQ — E-mini Nasdaq 100 futures (Yahoo). Click another instrument to switch.

2 Direction

Long only
Short only
Long and Short

3 Entry conditions (all must be true)

Add up to four conditions. They are AND-joined: the strategy enters when every condition is satisfied on the same bar.

4 Risk + Exit

Distance from entry. 0.5–2% is typical for index futures.
Reward expressed as multiples of the stop distance.
Force-close after N 5-min bars. 48 ≈ 4 hours.
Ready. Configure above and hit Run.

📊 Results

R per trade
Sum of trade R
R-multiple
R-multiple
Cumulative R
Gross R / -gross R

Backtests overstate. This page evaluates your strategy on past data only. Real-world fills suffer slippage, latency and spread. Past statistical edge ≠ future statistical edge. If your equity curve only looks good after you tuned the parameters until it did, you have overfit — not edge.

📋 Last 10 trades

#Entry timeSideEntryExitRReason

📤 Export

Take your strategy to TradingView for forward-testing on live charts, or grab the YAML config to run it on your own machine.

Pine Script v5. Tested as of generator version 1.0. If the script fails to compile in TradingView after a future Pine update, regenerate it from this page — usually fixes it.

How this Lab works

1. Block-based design. Every condition is a pre-vetted fragment. You can’t write arbitrary code — only stitch blocks. That keeps generated Pine compiling cleanly and keeps the backtest engine simple.

2. Browser-only compute. The CSV bar data is fetched once on first run; everything else runs in your browser. Nothing is sent to a server. No accounts, no tracking of your strategies.

3. R-multiples. Results are reported in R, not cash. R is your planned risk on the trade. +2R means you made twice what you risked; −1R is a clean stop hit. Trading in R neutralises position size.

4. What this is not. Not a live signal service, not advice, not a guaranteed system. It is a fast way to test ideas honestly.

The Lab finds patterns. The psychology series teaches you to trade them.

A backtest with positive expectancy is the easy part. Executing it in real time, accepting the losing trades, sizing for the drawdowns — that is the work the psychology series covers.

Read the Trading Psychology Series →