TrendRelay Backtest Lab · MS Trend + Supertrend combined
Upload CSV
Fetch (Delta)
Click to select OHLCV CSV
Proxy:
Calls your own proxy route (see delta_proxy_addon.py), not Delta directly -- avoids CORS entirely. Candles are cached in this browser, so repeat fetches for the same symbol/resolution only pull new data since last time.
Parameters
Validated on 1H timeframe -- set "Backtest timeframe" below accordingly if your source data isn't already 1H.
Validated on 1H timeframe, ~85-90% win rate on BTC/ETH -- set "Backtest timeframe" below accordingly. Average win is smaller than average loss; the high win rate is what makes it profitable, not win size. Entry trigger mode defaults to ATR-based (scales automatically across symbols/timeframes) -- sweep it (e.g. 0.1 to 0.3 in 0.05 steps) to find what maximizes win rate for your symbol/timeframe. Switch to "Fixed Points" mode to test a constant price offset instead, matching how the original Combined Strategy script works.
Your JS file must define a global function: function runCustomStrategy(bars, params) { ... return trades; } bars = array of {time, open, high, low, close, volume} (time in ms).
Return an array of trade objects: {side: 'long'|'short', entryTime, exitTime, entryPrice, exitPrice, qty, grossPnl, commission, netPnl, exitReason}.
Helper functions already available to your script: rma, trueRange, atr, pivotHigh, pivotLow, computeSupertrend.
Commission fixed at 0.05% per side, matching the live strategy's declared fee.
Load data and run the backtest to see results
Position Sizing & Leverage Calculator
Sizes your position so a full stop-out never exceeds your chosen risk %, then shows which leverage levels keep the exchange's own liquidation price safely BEYOND your strategy's stop -- not before it.
Liquidation move % is an approximation (roughly 100/leverage, ignoring maintenance margin and funding). Always confirm the exact liquidation price in Delta's own order/margin panel before sizing a real position.