Automated Trading

Trading bot profit factor: calculation and limitations

Trading bot profit factor: calculation and limitations

Trading bot profit factor: calculation and limitations

New Hope — Trading bot profit factor: calculation and limitations

Profit factor answers a limited question: how do the total positive and negative results in a selected trade sample compare? It is useful when examining a report, but it does not reveal the order of losses, open positions or the number of attempts behind a successful backtest.

Rather than searching for a universal “good” value, we will calculate the ratio, compare two identical values with different drawdowns and examine costs. All figures are hypothetical and do not represent New Hope trading accounts.

The formula and its boundaries

Profit factor = total positive results / absolute total negative results. The MetaTrader 5 testing-report documentation defines it using Gross Profit and Gross Loss. A value of 1 means their magnitudes are equal.

For example, +$120, +$80, −$50 and −$50 produce $200 in gains and $100 in losses. PF is 2, with a monetary difference of $100. This does not mean the deposit doubled: starting account capital is absent from the formula.

Define the sample first: dates, instrument, account, strategy version and how executions are grouped into trades. Then establish cost treatment. A ratio above 1 means the selected gains exceed the selected losses; it does not automatically establish a positive result after every relevant expense.

The same PF can hide different loss concentration

Consider two short ledgers. Both start with a $10,000 balance, contain no deposits or withdrawals and have no open positions between trades. The stated results include all costs assumed in this example. We observe balance after each closed trade; these numbers do not show equity fluctuations during a trade.

Measure

Ledger A

Ledger B

Trades, $

+200, −100, +200, −100, +200, −100

+600, −300

Gains, $

600

600

Losses, $

300

300

Profit factor

2

2

Net, $

+300

+300

Max. balance decline, $

100

300

Ledger B concentrates the entire recorded loss in one trade. A divides it among three trades, with balance reaching a new peak between losses. But reorder A so that its three profits come first and its three losses follow: balance drawdown becomes $300 as well. PF and final profit remain unchanged.

The aggregate ratio therefore contains no event sequence. This does not establish that A is superior; both samples are too short to support that conclusion. It demonstrates which questions disappear when a history is compressed into one number.

How commissions change the calculation

Return to the four outcomes +120, +80, −50, −50. Now treat them as before-commission amounts and assume a $10 charge for each completed trade. They become +110, +70, −60, −60. After those commissions, gains total $180 and losses total $120. A PF calculated on that basis is 1.5, with a $60 net result.

This is a separate calculation with its method stated explicitly. In the MT5 trading-report documentation, Gross Profit/Gross Loss exclude commissions and swaps, while other sections include them. Similar labels on different screens therefore need their definitions checked. Never subtract an already included charge twice.

If costs turn a small gain into a loss, move the trade into the negative group rather than simply reducing aggregate profit. Costs allocated across partial executions also need consistent treatment. Use the order, fill and cost audit to reconcile the underlying records.

High values and samples without losses

One $100 win and one $10 loss produce PF 10. Another $90 loss reduces it to 1. The formula was correct both times; the very small sample changed. A high value with a small denominator is particularly important to examine alongside the actual trades.

With no negative outcomes, the denominator is zero and there is no finite ratio. Software may display a special value or an infinity symbol. That describes the calculation for the observed sample, not an absence of future losses.

Open positions may also be excluded from closed-trade statistics. Read PF alongside balance and equity: profitable closures can coexist with a current unrealised loss.

A checklist for comparing reports

  1. Do the boundaries match? Compare dates, instruments, currency and account type.

  2. What counts as a trade? An execution, partial close or complete position cycle can group outcomes differently.

  3. Which costs are included? Record commissions, financing and the rules used for each group.

  4. Is the history complete? Check trade count, distribution over time, open positions and missing data.

  5. How did losses occur? Inspect their sequence, the largest loss and the account-value curves.

  6. How was this version selected? Ask for unsuccessful candidates and independent evaluation conditions.

Many trades do not automatically mean many independent observations: several operations may belong to one position or one market event. A high PF selected from numerous tests also needs out-of-sample evaluation. Comparing demo and live trading clarifies which execution environment the report represents.

What to discuss before choosing software

When considering NH PRO, ask about a specific report’s period, configuration, costs and open positions. “The PF is high enough” is less useful than being able to reconstruct its numerator, denominator and capital path. That turns a headline statistic into a checkable description of a past result.

Get our presentation about New Hope PRO and CRYPTO

Get our presentation about New Hope PRO and CRYPTO

Get our presentation about New Hope PRO and CRYPTO