PnL calculation methods
Profit calculation methods define how TradingView measures your realized profit and loss (PnL) when you close all or part of a position. Two methods are available — FIFO and WAC — and you choose the one that fits how you trade.
Each method decides which shares count as sold first, and therefore the cost basis applied to the trade. Your cost basis is what you paid for the shares, including commissions and fees — the reference point for every profit and loss calculation.
- FIFO (First in, first out) FIFO sells the shares you bought earliest first. If you buy 100 shares at $10 and then 100 at $15, selling 100 shares uses the $10 cost basis first.
- WAC (Weighted average) Weighted average values every share at the average cost of your whole position. Buying 100 shares at $10 and 100 at $15 gives an average cost of $12.50 per share, and every sale uses that figure.
Why profit calculation methods matter The method you choose shapes how your results are reported:
Match how your broker reports realized PnL by keeping the same calculation logic
Track the cost basis of positions you keep open, which drives your unrealized PnL
Keep your trading journal comparable over time and easy to reconcile with statements
Start with FIFO, the standard method, if you're unsure which to use