Crypto backtester: describe a strategy, read the code, run it

Describe a trading strategy in a sentence or paste a TradingView Pine Script. GoldRush turns it into code you can read, then tests it on real Hyperliquid candles with fees and slippage counted on every fill.

Open to anyone with a free GoldRush account. Runs bill to your own API key, and your strategies stay in your browser.

Strategy BacktestSOL-PERP · 1h · 180 days
You
Buy SOL when RSI(14) drops below 30 on the 1h chart. Sell when it crosses back above 60. Use a 2% stop loss.

RSI mean reversion

BGood · 73/100
Return
+18.4%
Max drawdown
−10.7%
Win rate
59%
Trades
41
  • Strategy+18.4%
  • Buy and hold−7.1%
Drawdown−10.7% max
Example data, for illustration. Every run returns metrics, equity and drawdown curves and the full trade list.

AI backtesting in plain English, with the code in view

Say what you want to trade, on which market and timeframe. The builder answers with the rules it understood, the numbers you can tune, and the TypeScript that will run. If a rule reads wrong, you see it before a single candle is fetched, and you fix it by saying so.

New strategyDescribe · Import Pine Script
You
Buy SOL when RSI(14) drops below 30 on the 1h chart. Sell when it crosses back above 60. Use a 2% stop loss.
Builder
RSI mean reversion on SOL-PERP, 1h. It buys the dip below 30, sells into the bounce at 60 and keeps a 2% stop under every entry. The four numbers below are tunable.
Enter
RSI(14) crosses below 30
Exit
RSI(14) crosses above 60
Stop loss
2% below entry
Position
Long, 1× leverage
Market
SOL-PERP, 1h candles
  • RSI period14
  • Oversold level30
  • Exit level60
  • Stop loss2%
Tune before runningRun backtest
Example data. The builder asks for the market and timeframe when you leave them out.
import { RSI } from "technicalindicators"; export function onCandle(candles, portfolio, parameters) {  const { rsiPeriod, oversold, exitLevel } = parameters;  const closes = candles.map((c) => c.close);  const price = closes[closes.length - 1];  const rsi = RSI.calculate({ period: rsiPeriod, values: closes });  const [prev, now] = rsi.slice(-2);  const holding = portfolio.positions.length > 0;   let action = "HOLD";  if (!holding && prev >= oversold && now < oversold) action = "BUY";  if (holding && prev <= exitLevel && now > exitLevel) action = "SELL";   return {    action, size: 1, price, orderType: "MARKET",    stopLoss: price * (1 - parameters.stopLossPercent / 100),    takeProfit: 0, confidence: 0.6,    reasoning: `RSI ${now.toFixed(1)}`,  };}
//@version=5strategy("RSI dip buyer", overlay = true)len = input.int(14, "RSI period")r = ta.rsi(close, len) if ta.crossunder(r, 30)    strategy.entry("Long", strategy.long)if ta.crossover(r, 60)    strategy.close("Long") stopPx = strategy.position_avg_price * 0.98strategy.exit("Stop", "Long", stop = stopPx)

Backtest Pine Script strategies on Hyperliquid

Already have a strategy on TradingView? Paste the script. It becomes the same readable definition and TypeScript as a described strategy, with its inputs turned into sliders, and runs on Hyperliquid prices instead of an exchange you don't trade on.

AI-written Pine often compiles with the wrong logic. Here the rules are spelled out in words next to the code, so a misread entry or stop is easy to spot.

Results you can check, trade by trade

Every run streams its log as it goes, then opens on one plain sentence about what happened. Behind it: return, drawdown, win rate against the rate needed to break even, profit factor, Sharpe, Sortino and Calmar, a grade out of 100, and every trade with the reason it closed. Move a slider, run again, and the new result is compared with the last.

ResultsSOL-PERP · 1h · $10,000 start
  • SOL-PERP close
  • Entry, trade won
  • Entry, trade lost

Gained 18.4% over 180 days across 41 trades. Winners averaged +2.9% and losers −1.8%, and it won 59% of trades against the 38% needed to break even.

Return
+18.4%
Annualised
+40.9%
Max drawdown
−10.7%
Win rate
59%
Profit factor
1.74
Avg win / loss
+2.9% / −1.8%
Sharpe
1.62
Sortino
2.31
Calmar
3.83
Grade
B · Good (73 of 100)
Latest example trades
OpenedPnLClosed by
27 Oct 14:00+2.35%End of period
21 Oct 03:00−2.17%Stop loss
17 Oct 19:00+4.14%Signal
12 Oct 08:00+1.89%Signal
6 Oct 22:00−2.17%Stop loss
1 Oct 11:00+3.68%Signal
26 Sep 05:00+0.71%Signal
19 Sep 16:00−2.17%Stop loss
Example data, for illustration. The verdict and the grade are worked out by Strategy Backtest's own scoring code from these numbers.

Fees, slippage and stops, counted on every fill

A backtest is only worth what its fills are worth. The engine charges for every trade, and where it can't know what happened inside a candle it assumes the worse fill.

Fees and slippage on every fill
Each side of a trade costs 0.085%: 0.05% slippage plus a 0.035% taker fee. A strategy that only works for free shows up as one that doesn't.
Stops, gaps and liquidation
A stop or target fills at its level, or at the open when a candle gaps past it. Above 1x, positions are isolated margin and close at their liquidation price.
A drawdown kill switch
Set a maximum drawdown. Equity is checked at each candle's low, and when it falls through the limit every position closes and the run stops trading.
The run sizes the trades
The strategy decides when to enter and exit. Each entry is sized at the strategy's position size as margin, times the run's leverage. A strategy that sets its own size is told so in the log.
Conservative on purpose
Stops and targets are tightened by 15% and numeric parameters vary by ±1.5% per candle, so an edge has to survive small changes. Anything still open on the last candle closes there, costs included.
Checked code, fresh candles
Strategy code is validated, then run in an isolated sandbox with a time limit on every candle and on the whole run. Candles are read from GoldRush HyperCore on your key each run.

Hyperliquid backtesting today, Solana next

Test any Hyperliquid perpetual, from BTC-PERP and ETH-PERP to SOL-PERP and HYPE-PERP, or a Hyperliquid spot pair. Pick the candle size and how far back to go, and set leverage per run up to the market's own maximum.

Solana traders can backtest SOL as SOL-PERP today, on Hyperliquid's price history. Backtests on Solana DEX markets are not available yet.

Longest backtest window per candle size
CandlesLongest window
1m3 days
5m18 days
15m30 days
1h180 days
4h365 days
1d730 days

What traders test with it

  • Mean reversion on SOL

    Buy oversold dips on SOL-PERP and sell the bounce, then slide the RSI levels and the stop to see how fragile the edge is.

  • Trend following on BTC and ETH

    Moving-average crosses and breakouts on 4h or daily candles, with up to two years of history on the daily chart.

  • Port a TradingView strategy

    Paste the Pine Script you already trust and test it on Hyperliquid prices, with Hyperliquid-like costs, before you trade it there.

  • Ask why it worked

    Ask the analyst about a finished run, or tell the builder what to change and run the new version against the last one.

Start free

Strategy Backtest reads candles on your own GoldRush API key, the same key that serves the Hyperliquid API and 100+ other chains. Every account starts with a free trial.

Strategy Backtest FAQ

A crypto strategy backtester in the GoldRush platform, open to anyone with a free GoldRush account. You describe a trading strategy in plain English, or paste a TradingView Pine Script, and it becomes a strategy definition plus TypeScript onCandle code that you can read. You then run it on Hyperliquid candle history and get metrics, equity and drawdown curves, a grade and every trade.

Yes. Paste a Pine Script strategy of 50 to 30,000 characters. It is converted into the same strategy definition and TypeScript code as a described strategy, so you can check the rules it extracted before you run it.

Hyperliquid perpetuals (written as COIN-PERP, such as BTC-PERP, ETH-PERP or SOL-PERP) and Hyperliquid spot pairs, on 1m, 5m, 15m, 1h, 4h or 1d candles. The longest window depends on the timeframe: 3 days of 1m candles up to 730 days of daily candles.

You can backtest SOL today as SOL-PERP on Hyperliquid, with Hyperliquid's own price history. Backtests on Solana DEX markets are not available yet.

Every entry and exit costs 0.085% of the fill: 0.05% slippage and a 0.035% taker fee. A stop or target fills at its level, or at the open when a candle gaps past it, and positions still open at the end of the window close on the last candle. Funding payments are not charged.

Not yet. The engine opens long positions only, on isolated margin. You pick leverage per run, from 1x to 20x, capped at the market's maximum; spot pairs run at 1x. Above 1x, a position that falls to its liquidation price is closed there.

A finished run costs 100 credits, plus the candle calls it makes to GoldRush HyperCore. Both are billed to a GoldRush API key from your own account, which you pick or paste in the tool. A cancelled or failed run isn't charged the 100 credits, though the candles it already read are. Every account starts with a free trial; see pricing.

In your browser. Strategies, runs and parameter presets are kept locally, with the ten most recent full results per strategy, and the server keeps nothing between requests.

No. It is a backtester only: no paper trading and no live execution.

The strategy builder, the Pine Script import and Ask AI each take up to 20 requests per user every 10 minutes. Runs have no such limit: each one is billed to your key.

Go further

Start here

The data behind it

Read more