Calculators
Profit factor of a trade list API
Profit factor = grossProfit/grossLoss over a list of per-trade PnLs (>1 is profitable), with win-rate, payoff ratio and net PnL. Deterministic backtest stats. Answers 'what's my profit factor','is this strategy profitable','win rate and payoff for these trades'.
Price$0.03per request
MethodPOST
Route/v1/calc/trade-profit-factor
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calctradingprofit-factorbackteststatisticswin-ratepayoffperformance
API URL
Integration docshttps://x402.hexl.dev/v1/calc/trade-profit-factorExample request
{
"trades": [
100,
-50,
200,
-30,
-20
]
}Example response
{
"trades": 5,
"wins": 2,
"losses": 3,
"grossProfit": 300,
"grossLoss": 100,
"netPnl": 200,
"profitFactor": 3,
"winRatePct": 40,
"payoffRatio": 4.5,
"rating": "excellent",
"formula": "profitFactor = grossProfit / grossLoss"
}Input schema
{
"type": "object",
"required": [
"trades"
],
"properties": {
"trades": {
"type": "array",
"description": "Per-trade PnL numbers (positive = win).",
"items": {
"type": "number"
},
"examples": [
[
100,
-50,
200,
-30,
-20
]
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}