Loading page…
Loading page…
Controlled TradingView Strategy Tester benchmarks showing how commissions, slippage ticks, and process_orders_on_close change net equity.
Model how exchange fees and tick slippage erode annual edge, then copy the exact Pine v6 strategy() declaration.
0.05% taker each side (10 bps) + ~2.5 bps spread/slippage
1//@version=62strategy(3 title = "Realistic Backtest (Binance USDT-M Perp)",4 overlay = true,5 initial_capital = 10000,6 default_qty_type = strategy.percent_of_equity,7 default_qty_value = 100,8 commission_type = strategy.commission.percent,9 commission_value = 0.05,10 slippage = 2,11 process_orders_on_close = false,12 calc_on_order_fills = false,13 use_bar_magnifier = false14)15 16// Verify fill realism: never rely on 0-fee / 0-slippage defaults.17// Modelled round-trip friction: ~12.5 bps per trade.Same RSI(7) + Bollinger Band mean-reversion rules on BTCUSDT.P 5m — zero-fee backtest looks profitable, realistic costs flip Profit Factor below 1.0.
| Scenario | Net Profit | Profit Factor | Max Drawdown | Win Rate | Trades | Observed Behavior |
|---|---|---|---|---|---|---|
| TradingView Default (0% fee, 0 slippage) | +64.2% | 1.46 | 12.8% | 58.4% | 618 | Misleading default: ignores ~$7,400 in cumulative exchange friction. |
| Realistic Binance (0.05% + 2 ticks) | -18.9% | 0.91 | 31.5% | 51.2% | 618 | Fee drag exceeds average gross trade edge. |
| Realistic + process_orders_on_close = true | +29.4% | 1.19 | 19.3% | 55.0% | 618 | Artificially optimistic: assumes fill at exact close price that triggered the signal. |
Lower trade frequency (142 trades/yr) and wider average move allow Donchian 20/10 on ES1! to retain ~82% of gross edge.
| Scenario | Net Profit | Profit Factor | Max Drawdown | Win Rate | Trades | Observed Behavior |
|---|---|---|---|---|---|---|
| Ideal (0 commission, 0 slippage) | +41.8% | 1.52 | 14.1% | 40.8% | 284 | Gross trend-following baseline. |
| Realistic ($2.25/contract + 1 tick) | +34.3% | 1.41 | 16.4% | 39.4% | 284 | Total friction is $7,100 over 2 years; edge remains intact. |
| Venue / Market | Recommended Realistic Assumption | Pine Commission Type | Copy |
|---|---|---|---|
| Binance USDT-M Perp | Taker 0.05% each side + 2 ticks slippage for market orders. | commission_type = strategy.commission.percent | |
| Bybit Linear Perp | Taker 0.055% each side + 2 ticks slippage. | commission_type = strategy.commission.percent | |
| CME ES1! / NQ1! | $2.25/contract all-in fee + 1 tick slippage during RTH. | commission_type = strategy.commission.cash_per_contract | |
| SPY / QQQ / AAPL | $1.00 minimum per order + 2 ticks ($0.02) spread/slippage. | commission_type = strategy.commission.cash_per_order | |
| EURUSD (ECN 5-Digit) | 0.0035% commission + 8 ticks (0.8 pip) spread/slippage. | commission_type = strategy.commission.percent |