Cost Reality Check: EMA Cross Before and After Fees

Most backtests you see online are run with zero fees. This strategy exists to show what fees do to a simple rule, trade by trade.
The rule is deliberately plain: go long when the 20 EMA crosses above the 50 EMA, exit when it crosses back below (shorts optional). It is not meant to be traded. It is a vehicle for the table.
WHAT THE TABLE SHOWS
For every closed trade the script adds back the commission it paid, so you can see the same trades before and after fees:
- Before commission: the result with slippage already in the fills but no commission charged (% of starting capital)
- Commission paid: the total fees, as % of starting capital
- After commission: what the Strategy Tester reports
- Avg trade before commission (bps of the position size) next to Avg commission per round trip (bps)
- Break-even commission per side: the fee that would bring the average trade to exactly zero (it reads "none" when the average trade is already negative before fees)
- Winners before / after commission: how many trades won before fees and how many still won after them
- A one-line verdict: no edge even before fees / fees take the whole edge / fees take over half / edge survives these fees (fewer than 30 trades: too few to judge)
The same numbers are in the Data Window.
DEFAULT SETTINGS (change them in Properties to match your venue)
Initial capital 10,000. Position size 10% of equity. Commission 0.10% per side (0.20% round trip, a common taker fee). Slippage 2 ticks per fill. No pyramiding. Orders fill at the next bar's open after the cross.
WHAT IT FOUND WITH THESE DEFAULTS (same rule, same fees, same dates: 2024-12-31 to 2026-11-12; only the timeframe or symbol changes)
- BITSTAMP:BTCUSD 30m: 323 trades. Before commission -2.17%, commission 6.19%, after -8.35%. The fee bill was almost three times the raw loss.
- BITSTAMP:BTCUSD 1h: 160 trades. Before commission -2.36%, commission 3.08%, after -5.44%.
- BITSTAMP:BTCUSD 4h: 39 trades. Before commission +1.45%, commission 0.78%, after +0.67%. The only positive raw result, and fees still took over half of it.
- BITSTAMP:ETHUSD 1h: 174 trades. Before commission -4.66%, commission 3.31%, after -7.97%.
- AMEX:SPY 1h (regular session only): 31 trades. Before commission +0.56%, commission 0.42%, after +0.14%.
- FX:EURUSD 1h: 106 trades. Before commission +0.25%, commission 2.11%, after -1.86%. A small gain before fees became a loss.
These six are every run made on these dates for this description; none was dropped. A fair warning on the last two: 0.10% a side is a crypto taker fee. Many brokers charge no commission on SPY, and EURUSD costs are mostly spread, often around 0.01% a side, so at your real costs those two would keep far more of their raw result. The 4h and SPY samples are far too small to mean anything, and nothing here says the rule has an edge. The point is the pattern: halving the timeframe roughly doubles the trade count, and the fee bill grows with it whether or not the rule makes anything before fees. The table on the chart updates as new bars arrive; the preview chart was captured later on 2026-11-12, so its 30m table reads before -2.64%, commission 6.15%, after -8.79%.
HOW TO USE IT
Put your own commission and slippage in Properties, then compare "Avg trade before commission" with "Avg commission per round trip". If the first is not comfortably larger than the second, no amount of tuning the entry will save the result. The break-even row tells you the most you could pay per side before the average trade goes to zero.
NOTES
Computed only from the chart's own bars; no request.security and nothing repaints. The table refreshes on the latest bar; entries and exits only happen when a bar closes. "Before commission" still includes slippage, because slippage is part of the fill price. This is an educational tool, not a trading recommendation.
The rule is deliberately plain: go long when the 20 EMA crosses above the 50 EMA, exit when it crosses back below (shorts optional). It is not meant to be traded. It is a vehicle for the table.
WHAT THE TABLE SHOWS
For every closed trade the script adds back the commission it paid, so you can see the same trades before and after fees:
- Before commission: the result with slippage already in the fills but no commission charged (% of starting capital)
- Commission paid: the total fees, as % of starting capital
- After commission: what the Strategy Tester reports
- Avg trade before commission (bps of the position size) next to Avg commission per round trip (bps)
- Break-even commission per side: the fee that would bring the average trade to exactly zero (it reads "none" when the average trade is already negative before fees)
- Winners before / after commission: how many trades won before fees and how many still won after them
- A one-line verdict: no edge even before fees / fees take the whole edge / fees take over half / edge survives these fees (fewer than 30 trades: too few to judge)
The same numbers are in the Data Window.
DEFAULT SETTINGS (change them in Properties to match your venue)
Initial capital 10,000. Position size 10% of equity. Commission 0.10% per side (0.20% round trip, a common taker fee). Slippage 2 ticks per fill. No pyramiding. Orders fill at the next bar's open after the cross.
WHAT IT FOUND WITH THESE DEFAULTS (same rule, same fees, same dates: 2024-12-31 to 2026-11-12; only the timeframe or symbol changes)
- BITSTAMP:BTCUSD 30m: 323 trades. Before commission -2.17%, commission 6.19%, after -8.35%. The fee bill was almost three times the raw loss.
- BITSTAMP:BTCUSD 1h: 160 trades. Before commission -2.36%, commission 3.08%, after -5.44%.
- BITSTAMP:BTCUSD 4h: 39 trades. Before commission +1.45%, commission 0.78%, after +0.67%. The only positive raw result, and fees still took over half of it.
- BITSTAMP:ETHUSD 1h: 174 trades. Before commission -4.66%, commission 3.31%, after -7.97%.
- AMEX:SPY 1h (regular session only): 31 trades. Before commission +0.56%, commission 0.42%, after +0.14%.
- FX:EURUSD 1h: 106 trades. Before commission +0.25%, commission 2.11%, after -1.86%. A small gain before fees became a loss.
These six are every run made on these dates for this description; none was dropped. A fair warning on the last two: 0.10% a side is a crypto taker fee. Many brokers charge no commission on SPY, and EURUSD costs are mostly spread, often around 0.01% a side, so at your real costs those two would keep far more of their raw result. The 4h and SPY samples are far too small to mean anything, and nothing here says the rule has an edge. The point is the pattern: halving the timeframe roughly doubles the trade count, and the fee bill grows with it whether or not the rule makes anything before fees. The table on the chart updates as new bars arrive; the preview chart was captured later on 2026-11-12, so its 30m table reads before -2.64%, commission 6.15%, after -8.79%.
HOW TO USE IT
Put your own commission and slippage in Properties, then compare "Avg trade before commission" with "Avg commission per round trip". If the first is not comfortably larger than the second, no amount of tuning the entry will save the result. The break-even row tells you the most you could pay per side before the average trade goes to zero.
NOTES
Computed only from the chart's own bars; no request.security and nothing repaints. The table refreshes on the latest bar; entries and exits only happen when a bar closes. "Before commission" still includes slippage, because slippage is part of the fill price. This is an educational tool, not a trading recommendation.
Ten checks before you believe a backtest — the free one-page checklist: quanticator.app/tv · No-repaint HTF Template Pack (Pine v6, $39): jordonharrell.gumroad.com/l/norepaint-htf-template-pack
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Ten checks before you believe a backtest — the free one-page checklist: quanticator.app/tv · No-repaint HTF Template Pack (Pine v6, $39): jordonharrell.gumroad.com/l/norepaint-htf-template-pack
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.