Skip to content

Trading metrics

Profit Factor: Formula, Examples and What a Good Number Means

Profit factor is gross profit divided by the absolute value of gross loss: the total won on closed winning trades divided by the total lost on closed losing trades. Above 1.0, winners made more than losers lost; 1.0 is break-even; below 1.0 is a net loss, on whatever costs the report includes. The ratio is undefined when there are no losing trades, and it ignores trade count, trade order and drawdown.

Every page in the trading metrics library uses the same formulas. All numbers here are illustrative. Automation executes a strategy's rules; it does not create an edge.

Illustrative cover for profit factor: a stack of winning trades divided by a smaller stack of losing trades, with the official PineConnector logo.
Profit factor compares the total of winning trades with the total of losing trades.

Profit factor at a glance

  • Definition: gross profit ÷ absolute gross loss.
  • Same value from averages: (W × AW) ÷ (L × AL).
  • Break-even point: 1.0, on the report's own cost basis.
  • Undefined when: there are no losing trades (division by zero).
  • Typical use: summarising whether a backtest or an account history won more than it lost, read alongside trade count and drawdown.
  • Where to find it: the TradingView strategy report, the MT5 Strategy Tester report and Trading Report, and PineConnector Analytics for MT5.
  • What it leaves out: the number of trades, their order, drawdown and open positions.

What is the profit factor formula?

Profit factor = gross profit ÷ |gross loss|

  • Gross profit is the sum of the results of all closed winning trades, in account currency.
  • Gross loss is the sum of the results of all closed losing trades, used here as a positive number.
  • Breakeven trades add nothing to either total, so they leave the ratio unchanged.

TradingView's Help Center describes the calculation as "dividing the absolute value of all winning trades by the absolute value of all losing trades".[1] MetaQuotes' MetaTrader 5 help uses the same ratio, with 1.0 indicating equal totals.[2] MQL5 stores gross loss as a value "less than or equal to zero". When gross loss is zero, its tester statistics return DBL_MAX, the largest representable floating-point number.[3] Read a sample with no losses as undefined, not as an excellent result.

Profit factor = (W × AW) ÷ (L × AL)

W is the win rate and L the loss rate, each as a share of all closed trades. AW is the average win and AL the average loss as a positive number. For N closed trades with both wins and losses, gross profit is N × W × AW and absolute gross loss is N × L × AL, so N cancels. If there are losses but no wins, use totals directly: profit factor is 0 even though an average win cannot be computed. No trades or only breakevens leaves the ratio undefined.

Worked example: calculating profit factor from a trade list

Illustrative example, not a recommendation. A hypothetical report before costs lists 20 closed trades in a USD account: 10 winners averaging 200 USD and 10 losers averaging 100 USD, with no breakevens.

  1. Gross profit: 10 × 200 = 2,000 USD.
  2. Gross loss: 10 × 100 = 1,000 USD, as an absolute value.
  3. Profit factor: 2,000 ÷ 1,000 = 2.0.
  4. Check with averages: W = L = 10 ÷ 20 = 0.5, so (0.5 × 200) ÷ (0.5 × 100) = 100 ÷ 50 = 2.0.
  5. Net profit: 2,000 − 1,000 = 1,000 USD, or 50 USD per trade.

Now deduct an illustrative 20 USD round-trip cost from every trade for spread and commission. This assumes those costs were absent from the starting results; do not deduct spread or slippage again when actual fills already reflect them. Each winner shrinks to 180 USD and each loser grows to 120 USD, assuming no trade changes sign. Gross profit becomes 1,800 USD and gross loss 1,200 USD, so the profit factor falls from 2.0 to 1.5. Net profit falls to 600 USD, or 30 USD per trade.

One identity ties the numbers together: net profit = gross loss × (profit factor − 1). Here 1,000 × (2.0 − 1) = 1,000 and 1,200 × (1.5 − 1) = 600. A profit factor of exactly 1.0 therefore means zero net profit.

Illustrative diagram of profit factor: gross profit of 2,000 USD divided by gross loss of 1,000 USD gives 2.0; after a 20 USD cost per trade, 1,800 divided by 1,200 gives 1.5.
The same 20 illustrative trades before and after a 20 USD cost per trade. Costs shrink every winner and enlarge every loser, so the ratio falls.

How does profit factor relate to win rate and payoff ratio?

Splitting the second formula into two ratios gives profit factor = (W ÷ L) × payoff ratio, where the payoff ratio is AW ÷ AL. TradingView reports those inputs as "Percent profitable" and "Average profit / average loss".[4][5]

A high win rate alone does not lift the ratio above 1.0. TradingView notes that a strategy "can have a 90% win rate and still lose money if the few losses are massive".[4] Illustrative: 16 winners averaging 50 USD and 4 losers averaging 250 USD give an 80% win rate, 800 ÷ 1,000 = 0.8 and a net loss of 200 USD.

Very different combinations of win rate and payoff ratio produce the same profit factor:

  • Profit factor 0.8: win rate 80% with a payoff ratio of 0.2.
  • Profit factor 1.0: win rate 50% with payoff 1.0; 40% with payoff 1.5; or 25% with payoff 3.0.
  • Profit factor 1.5: win rate 60% with payoff 1.0; 50% with payoff 1.5; or 20% with payoff 6.0.
  • Profit factor 2.0: win rate 50% with payoff 2.0.

These combinations are illustrative, with no breakevens, so L = 1 − W. Each combination with a profit factor of 1.0 sits at its break-even win rate, 1 ÷ (1 + payoff) before costs. For a payoff of 3.0, that is 1 ÷ 4 = 25%.

A profit factor above 1.0 goes with a positive monetary expectancy on the same trade and cost basis, and one below 1.0 with a negative expectancy, because monetary expectancy per trade, (W × AW) − (L × AL), equals L × AL × (profit factor − 1). In the worked example, 0.5 × 100 × (2.0 − 1) = 50 USD per trade. This identity does not equate monetary expectancy with mean R-multiples when initial risk varies. The two monetary metrics can still rank strategies differently. The three profiles below share a profit factor of 1.5, yet for the same average loss their expectancy differs, and so does their exposure to losing streaks.

Illustrative diagram: three trade profiles with the same profit factor of 1.5, with win rates of 60%, 50% and 20% and chances of five losses in a row of 1.0%, 3.1% and 32.8%.
Illustrative, assuming independent trades with a constant loss rate L. The chance that five trades in a row from a given trade all lose is L to the power 5: 0.4⁵ ≈ 1.0%, 0.5⁵ ≈ 3.1% and 0.8⁵ ≈ 32.8%.

What is a good profit factor?

There is no universal good profit factor. The number depends on costs, trade count, how results are distributed and how far the account fell along the way. These commonly cited reference points each have limits.

  • 1.0 is break-even. MetaQuotes and TradingView both treat 1.0 as the line between a net gain and a net loss.[2][1] The line holds only on the report's cost basis: 1.1 before costs can be a net loss after them.
  • About 1.5 to 2.0 is a band practitioners quote. LuxAlgo's library says many practitioners treat net profit factors "around 1.5 to 2.0 on a large trade sample as promising".[6] That is a convention, not a statistical test, and it assumes net-of-cost figures and a large sample.
  • Far above 3 in a backtest is a reason to check. The same source treats such values as a reason to investigate overfitting or a tiny sample.[6] Check the trade count, whether one trade dominates and whether costs were included. See overfitting and curve fitting.
  • A value called good can sit beside a large drawdown. In a 2023 MetaQuotes walkthrough of the MT5 Trading Report, a profit factor of 1.91 is "a good value", yet the account showed a 72.3% maximum drawdown (rounded to 72% in its summary). MetaQuotes concluded the strategy "cannot be considered stable and safe".[7]

Trade count matters as much as the ratio. TradingView's Pine Script FAQ asks for enough simulated trades to assess hypothetical performance, "ideally 100 trades or more".[8] That is guidance for filling its report, not a point at which a profit factor becomes reliable. See how many trades a backtest needs.

Where do TradingView and MT5 show profit factor?

TradingView strategy report

As of 25 September 2026, TradingView calls its backtest panel the strategy report, "formerly known as the Strategy Tester".[9] Profit factor sits at the top of Key stats on the Metrics tab. It appears again on the Returns sub-tab of Return details, beside gross profit and loss, commission paid and expected payoff, for all, long and short trades.[10] It uses "realized figures only", so open positions are excluded.[1]

In Pine Script v6, the variables strategy.grossprofit and strategy.grossloss hold the two totals. TradingView's own strategy example divides one by the other to show a profit factor on the chart.[10] Handle a zero gross loss if you do the same. The TradingView strategy report guide covers the neighbouring metrics.

MetaTrader 5 Strategy Tester and Trading Report

The MT5 Strategy Tester report, on the Results tab, lists Profit Factor beside Gross Profit, the monetary total of winning trades, and Gross Loss.[2] For a live or demo account, the Trading Report (Reports in the View menu) shows Profit Factor on its Summary tab and a "Profit Factor by Symbols" breakdown.[11] The MT5 Strategy Tester report guide covers the other tester fields.

Which costs are inside the number?

TradingView deducts commission from each winning trade before adding it to gross profit, and adds it to the size of each loss.[12][13] A strategy without commission arguments applies no commission by default; users can override that setting in Settings/Properties.[10]

MT5's reports differ from each other. The Trading Report's Summary calculates Gross Profit and Gross Loss "excluding swaps and commissions", while its Profit/Loss tab includes them.[11] The saved account-statement guide classes deals by their total result after profit/loss, commission, fees and swap. When reconstructing it, preserve booked charge/credit signs instead of subtracting an already signed debit twice.[14] The Trading Report help does not say which totals its Profit Factor uses, so check it on your own account.

In MT5, a buy is executed at the Ask and a sell at the Bid, so the broker's spread is already inside each deal.[15] Confirm two reports use the same costs before comparing their ratios. See transaction costs in algorithmic trading.

Why can TradingView and MT5 show different profit factors?

A PineConnector workflow runs from an idea to a measurable rule, a TradingView alert and an MT5 order. Profit factor can be measured at three points on that path, and each counts a different set of trades.

  1. TradingView strategy report: simulated trades on TradingView's data, with the commission and slippage you entered.
  2. MT5 account history: the deals your broker executed, at its prices, on the cost basis of the report you open.
  3. PineConnector Analytics: a Portal dashboard built from history the PineConnector MT5 EA shares. It needs MT5 EA v3.41 or later and, in the published guide, is not available for MT4.[16]

The stages in between are separate events: the alert condition becoming true, the alert triggering, webhook delivery, PineConnector processing the signal, the EA's order request, and broker acceptance, the deal and the position. A missed entry can leave a simulated trade absent from MT5; a missed exit can leave its broker position open. Either changes the records being compared. Manual trades work the other way: MT5's Trading Report counts Expert Advisor, copied-signal and manual deals on the account.[11]

Prices differ too, because TradingView and MetaTrader can use different data feeds, bid/ask quotes, spreads and timestamps.[17] PineConnector's Analytics guide defines profit factor from gross profit and gross loss. Its net-profit entry asks readers to check included costs before comparing reports.[16] Reconcile the trade lists for the same symbol and period first. A gap between two profit factors is something to explain; why TradingView and MT5 results differ lists the usual causes.

Illustrative diagram of where profit factor is measured: the TradingView strategy report, the MT5 Trading Report and PineConnector Analytics, beneath the stages from a strategy condition becoming true to the broker deal.
Illustrative map. Each report counts a different set of trades on its own cost basis, so reconcile the trade lists before comparing the ratios.

What does profit factor not tell you?

  • How many trades it rests on. Illustrative: 5 winners totalling 1,000 USD and 1 loser of 100 USD give 10.0. One more 100 USD loss gives 1,000 ÷ 200 = 5.0.
  • The order of trades, and so the drawdown. Illustrative: +300, −200, +300, −200 and −200, −200, +300, +300 both give 600 ÷ 400 = 1.5. Counting the starting balance as a peak, the largest fall from a peak is 200 USD in the first order and 400 USD in the second. Read maximum drawdown alongside it.
  • Whether one trade carries the result. In the worked example before costs, if one winner made 1,000 USD alone, removing it leaves 1,000 ÷ 1,000 = 1.0.
  • Open positions. TradingView's figure uses closed trades only, so an open losing position has no effect until it closes.[1]
  • Risk-adjusted return. Profit factor uses currency totals of closed trades, not the variability of returns. The Sharpe ratio divides mean excess return by the standard deviation of those same excess returns. The Sortino ratio divides mean return above a target by downside deviation.
  • Changes in position size. Larger positions weigh more in currency totals. R-multiples put trades of different sizes on one scale.
  • What comes next. Profit factor summarises a past or simulated sample. PineConnector's Analytics guide separates historical results from a forecast.[16]

Frequently asked questions

What is profit factor in trading?

Profit factor in trading is the total profit of all closed winning trades divided by the total loss of all closed losing trades, taken as a positive number. A value of 2.0 means winners made twice what losers lost. Above 1.0 is a net profit on the report's cost basis; below 1.0 is a net loss.

What is a good profit factor?

No single profit factor is good for every strategy. The fixed reference point is 1.0, break-even after whatever costs the report includes. LuxAlgo's library says many practitioners treat about 1.5 to 2.0, net of costs over a large sample, as promising, and treat values far above 3 as a reason to investigate overfitting or tiny samples. That band is a convention, not a statistical test.

What is the profit factor formula?

The profit factor formula is gross profit divided by the absolute value of gross loss. When both winning and losing groups exist, this also equals (win rate × average win) ÷ (loss rate × average loss). For example, 10 winners averaging 200 USD and 10 losers averaging 100 USD give 2,000 ÷ 1,000 = 2.0. The ratio is undefined when there are no losing trades.

What does a profit factor of 1 or below mean?

A profit factor of 1.0 means gross profit equals gross loss, so net profit is zero on the report's cost basis. Below 1.0, losing trades lost more than winning trades made. For example, 16 winners averaging 50 USD and 4 losers averaging 250 USD give 800 ÷ 1,000 = 0.8, a net loss despite an 80% win rate.

Profit factor adalah apa? (What does profit factor mean?)

Profit factor adalah rasio total keuntungan kotor (gross profit) terhadap total kerugian kotor (gross loss) dalam nilai absolut. Nilai di atas 1 berarti total keuntungan dari transaksi yang menang lebih besar daripada total kerugian dari transaksi yang kalah. In English: profit factor is gross profit divided by absolute gross loss.

Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.

Related reading

Sources

  1. TradingView – Profit factor, accessed 25 September 2026.
  2. MetaQuotes – MetaTrader 5 Help: Testing Report, accessed 25 September 2026.
  3. MetaQuotes – MQL5 Reference: Testing Statistics, accessed 25 September 2026.
  4. TradingView – Percent profitable, accessed 25 September 2026.
  5. TradingView – Average profit / average loss, accessed 25 September 2026.
  6. LuxAlgo – Profit Factor (LuxAlgo Library), accessed 25 September 2026.
  7. MetaQuotes – New MetaTrader Report: 5 key trading metrics, accessed 25 September 2026.
  8. TradingView – Pine Script FAQ: Strategies, accessed 25 September 2026.
  9. TradingView – Pine Script release notes, accessed 25 September 2026.
  10. TradingView – Pine Script User Manual: Strategies, accessed 25 September 2026.
  11. MetaQuotes – MetaTrader 5 Help: Trading Report, accessed 25 September 2026.
  12. TradingView – Gross profit, accessed 25 September 2026.
  13. TradingView – Gross loss, accessed 25 September 2026.
  14. MetaQuotes – MetaTrader 5 Help: Trading Report (for advanced users), accessed 25 September 2026.
  15. MetaQuotes – MetaTrader 5 Help: Basic principles, accessed 25 September 2026.
  16. PineConnector – Trading analytics, accessed 25 September 2026.
  17. PineConnector – Frequently asked questions: price differences, accessed 25 September 2026.

PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.


Leave a comment

Back To PiCo Blog

Ready when your strategy is

You bring the strategy.We bring the infrastructure.

Connect TradingView to MetaTrader, choose where MT5 runs and put the full PineConnector workflow through its paces from your first month.

Strategy and trading decisions remain yours. The MT5 environment can be ours.

PineConnector Edge

Run the full PineConnector workflow.

$59/mo at launch

Core plan · 1 connection · 1 hosted MT5 environment

Try Core for $7

7 days of Core for $7, then $59/month at the launch price unless you cancel.