TradingView fee calculator: what fees and slippage do to your strategy
A strategy tested with zero commission in the Strategy Tester can look very different once each order pays its fee and its slippage. Type four numbers and see the compounded cost, the net return against the gross one, and the fee level at which the average edge is gone. Everything runs in your browser.
Your real trades instead of an average
The calculator assumes every trade earns the average. Your List of trades export knows better: the free preview of the dossier redoes the fee calculation on each of your trades, before and after the date up to which you tuned the strategy.
The export button of the List of trades needs a paid TradingView plan; on the free plan, paste your Pine script into the free judge instead. Free judge → · See a full example dossier →
The preview (before/after the cut date, and with fees) is free; the Monte Carlo is in the full dossier. No account, no Pine script; the raw CSV is not kept. How the Monte Carlo works →
The formula, step by step
With N trades, an average gross gain g per trade, a fee f and a slippage s per order (all as fractions: 0.1% = 0.001):
cost per round trip c = 2 × (f + s) net gain per trade n = g − c gross return (1 + g)^N − 1 net return (1 + n)^N − 1 (−100% if n ≤ −100%) compounded cost gross return − net return break-even fee f* = g / 2 − s- Why 2 ×: each trade has an entry order and an exit order, and each pays the fee and the slippage. This is the same model as the dossier, which removes 2 × the extra fee from each trade’s return.
- Why compounded: each trade reinvests the result of the previous ones, as a strategy sized in percent of equity does. The cost of fees then grows faster than the number of trades.
- Break-even fee: the net gain per trade is zero when f + s = g / 2. Above that fee per order, the compounded net return is negative whatever the number of trades.
Worked example with the default values: N = 100, g = 0.5%, f = 0.1%, s = 0.05%. The round trip costs 2 × 0.15% = 0.30%, so each trade nets 0.20%. Gross: 1.005100 − 1 = +64.67%. Net: 1.002100 − 1 = +22.12%. The costs take 42.55 points, about two thirds of the gross gain, and the edge is gone at 0.5% / 2 − 0.05% = 0.20% of fee per order.
Limits: every trade is given the average gain, fees are a percentage of the position (as with TradingView’s “percent of order” commission), and slippage is the same on every order. Real trades vary, and a mix of wins and losses compounds to less than its average suggests: read the result as an order of magnitude.
Questions
Why count fees twice per trade?
A trade has two orders: the entry and the exit. TradingView charges the commission set in the strategy properties on each order, so a 0.10% commission costs about 0.20% of the position per round trip, before slippage.
How do I turn TradingView slippage in ticks into a percentage?
In the strategy properties, slippage is set in ticks. Multiply the number of ticks by the tick size, divide by the price and multiply by 100. Example: 2 ticks of 0.01 on a 50.00 stock give 2 × 0.01 / 50 × 100 = 0.04% per order.
Why is my real result different from the calculator?
The calculator gives every trade the same average gain. Real trades vary, and with compounding, a mix of wins and losses grows less than its average suggests. It is an order of magnitude; the dossier redoes the calculation on each trade of your List of trades export.
Is anything sent to a server?
No. The calculation runs in your browser; the numbers you type are not sent anywhere.
See also: out-of-sample test on TradingView · convert an indicator into a strategy · Monte Carlo on the List of trades CSV
Research on past data. Strategy Arena gives no investment advice and does not trade for you. Past results do not predict future results. TradingView is a trademark of TradingView, Inc.