Guides, manuals and platform references.
A commission value of 2 is incomplete information. It could mean two dollars per order, two dollars per contract or two percent of the transaction. The number is innocent; the unit does the damage.
Match both the commission amount and its calculation mode to the fee you intend to model. TradingView applies strategy commission to entries and exits. Before using a backtest to justify automated trading, calculate the fees on one complete position by hand.
In an AlgoWay workflow that connects TradingView signals to live execution, this is part of comparing simulated results with the destination account. A commission assumption in the tester is a cost model, not evidence of what a broker actually charged.
Open the strategy settings and select Properties. The Commission setting has an amount and a mode. TradingView's strategy properties documentation defines three choices:
| Mode | What the amount means | What makes the fee grow |
|---|---|---|
| Percentage | A percentage of transaction value | Higher transacted value |
| Currency per contract | A cash charge for each traded unit | More contracts, shares, lots or units |
| Currency per order | A fixed cash charge for an order | More executed orders |
Cash commission values use the strategy account currency. In Pine, the corresponding public settings are strategy.commission.percent, strategy.commission.cash_per_contract and strategy.commission.cash_per_order. The declaration reference explains how these pair with commission_value. For percentage mode, 0.1 means 0.1%, not 10%.
Consider a hypothetical USD strategy buying three contracts in one order and selling all three in one exit order. Assume a cash commission input of $2. This is fee arithmetic, not a broker quote or a backtest result.
Now exit with three separate one-contract orders. The per-contract total stays $12. The per-order total becomes $8: one entry plus three exits, each charged $2. A strategy that scales out can therefore change its modeled costs without changing total traded quantity.
Testing only one unit with one entry and one exit hides this mistake: both cash modes produce $4 in that special case. Repeat the arithmetic with multiple units and multiple exits before trusting the setting.
For a simple hypothetical share trade, buy 100 shares at $50 and sell them at $52. With a 0.1% commission, entry costs $5,000 × 0.001 = $5. Exit costs $5,200 × 0.001 = $5.20. The $200 gross trading gain becomes $189.80 after these commissions alone.
Do not calculate this fee from starting equity or margin posted. Those are different quantities. For derivatives, establish the instrument's transaction-value convention before reusing a shares example.
If a hypothetical fee schedule quotes $4 per contract for a complete round trip, entering $4 per contract in a simulator that charges both sides would model $8. Where the fee is symmetric, the matching per-side amount is $2. Confirm what the published figure includes: a commission-only rate and an all-in rate are not interchangeable.
Tiered rates, minimum charges and different maker/taker fees also need care. The three built-in modes do not automatically describe every fee schedule. State your approximation and compare more than one plausible cost assumption if the exact schedule cannot be represented.
TradingView's trading-cost documentation treats commission and slippage separately. A correct commission setting does not prove that spread or fill-price assumptions are realistic.
Once the units agree, use trading expectancy after costs to judge how much room the strategy has left. A fee-setting error is easier to fix before it becomes a trading conclusion.