Free tool

Free ES futures backtester

Paste a Pine v6 strategy written for ES or MES. With a free account it runs on CME's 1-minute ES bars, with every trade on the chart and $2.50 a contract plus a tick of slippage charged. Free and unlimited with an account, no card.

Free plan · unlimited backtests · no card
The Alpha Charts dashboard
The dashboard
The AI writes your strategies. Then optimise them, screen the market and set alerts.
Open the dashboard →
Free plan, no card · paid plans with 30 days money back

Paste your script

Pine v6, as TradingView has it.

What it runs on

CME's 1-minute E-mini S&P 500 bars, two years deep, every minute of the futures day from the 18:00 New York open, joined into one continuous series the way ES1! is: the next quarterly contract takes over three trading days before expiry. Micro E-mini S&P 500 trades at the same prices, so MES runs on the same bars at its own dollars a point.

Your Pine script runs as written, on our own Pine runtime: a rule that fires on a close fills at the next bar's open, and stops and limits fill at the prices the runtime reports inside the bar. The data is eight hours behind real time, so the page is for testing a strategy, not for trading it live. Futures open with a free account.

Contracts, costs and history

CONTRACTA POINTA TICK (0.25)DEFAULT COMMISSION
ES · E-mini S&P 500$50$12.50$2.50 a contract each side
MES · Micro E-mini S&P 500$5$1.25$2.50 a contract each side

The commission your script declares per contract replaces the default, and market and stop orders pay one tick of slippage unless the script sets its own. The account starts at the script's initial_capital, or $100,000 when it names none. 1-minute and other odd-minute runs use the latest 120 sessions, about six months; 5-minute and longer use 600 sessions, about two years.

ES, MES or SPY

Many S&P 500 strategies are first written for SPY. On ES the same rules meet a different market: ES trades from 18:00 New York on Sunday to 17:00 on Friday with a one-hour break each day, while SPY's bars here are the 9:30 to 16:00 session by default. A time filter, or a rule that reads the day's open, sees a different day on ES, because the futures day starts at 18:00 the evening before.

Size is the second difference. One ES contract is $50 times the S&P 500 index and one MES is $5 times it, so at an index level of 7,000 a contract stands for $350,000 or $35,000. A script that sizes by a percentage of equity on a small account asks for less than one contract and makes no trades; size in contracts instead (default_qty_type = strategy.fixed), or set initial_capital to the account you trade.

Costs weigh differently too. The default $2.50 a contract on each side and a tick of slippage come to $30 for a round trip on ES with market orders and $7.50 on MES: the same commission on a contract a tenth the size, so on MES the costs take a larger share of every trade.

What a run shows

Net result after costs, Sharpe, profit factor, win rate, the worst drawdown and every trade on the chart with its entry, exit and result. The last third of the bars is kept apart and judged on its own, with its dates, so a strategy tuned on the first part is tested on bars it never saw. The rules, the data and its limits are written out in Data and methodology.

Trading a prop firm challenge? Write its rules into the script and test them here: backtest a prop firm challenge strategy. Trading the NQ instead? The NQ futures backtester runs the same way.

Questions

Is this ES futures backtester free?

Yes. A free account backtests ES or MES as often as you like, with no card: Run opens your script in the Alpha Charts terminal on the Free plan. The paid plans add the optimiser, the screener and more of the AI that writes and fixes scripts, each with 30 days money back.

Is it real ES data or an ETF?

Real ES: CME's 1-minute ES bars, two years deep, joined into one continuous series the way ES1! is, moving to the next quarterly contract three trading days before expiry. MES runs on the same prices at its own dollars a point. The data is eight hours behind, so it is for testing, not live trading.

ES or MES: which does it run?

Whichever your script names: ES at $50 a point and MES at $5 a point, both in 0.25-point ticks. A script that names either opens on it when you run it, and both are in the symbol menu.

Can I test an ES strategy on SPY instead?

You can, and the results will differ: SPY here runs on the 9:30 to 16:00 session by default, with costs as a share of the trade, while ES trades nearly around the clock with costs per contract. A rule that trades overnight, reads the futures day's open or sizes in contracts belongs on ES or MES.

Why does my ES script make no trades?

Usually the order size. At 100% of a $10,000 account the order is worth less than one ES or MES contract, so nothing fills, and the tester says so when it happens. Size in contracts with default_qty_type = strategy.fixed, or set initial_capital to the account the strategy is for.

MES or ES for a prop firm challenge strategy?

Whichever the challenge trades; the arithmetic is what changes. A $2,000 drawdown limit is 40 points against one ES contract and 400 points against one MES, so a script sized in MES can scale in steps a challenge account can carry.

How are commission and slippage charged?

$2.50 a contract on each side by default, or the commission your script declares per contract (commission_type = strategy.commission.cash_per_contract). Market and stop orders pay one tick of slippage unless the script sets its own.

How much history does a run use?

1-minute and the other odd-minute timeframes use the latest 120 sessions, about six months. 5, 15 and 30-minute and hourly timeframes use 600 sessions, about two years. Daily bars are built from the same data, on the futures day that opens at 18:00 New York time.

Can I test a prop firm challenge strategy?

Yes, with the challenge's rules written into the script: the account size, the contracts, the daily loss limit and the drawdown. The prop firm challenge page shows how, and the tester runs it on ES or MES with per-contract costs.

Is a backtest here a prediction?

No. It is what the script's rules would have done on past CME data with costs charged. Live fills, news and your own execution differ, so read it as a test of the rules, not a forecast.

ES, MES and the S&P 500 futures are CME Group contracts; ES1! is TradingView's name for the continuous contract. Alpha Charts is software for testing trading scripts, is not affiliated with CME Group or TradingView and gives no investment advice. A backtest shows what rules would have done on past data, not what they will do.