APTF calculation methodology: formulas for forex
The APTF calculation methodology, collected in one place. All the calculations on the site are models: they show the mechanics of a formula, not a forecast of a result on the currency market. Here are the formulas, the assumptions and the limits of applicability in full, so that they do not have to be hunted for across the pages.
General principles
Not a single number hidden inside a script: every parameter of a forex calculation that the answer depends on sits on its own slider. A hard-wired constant goes out of date silently, and an error in it cannot be seen from outside.
no hidden quantitiesThe numbers you enter are not sent to a server and are not stored anywhere except on your device.
locallyOn every page the expression is given with the numbers substituted. The result can be repeated in a spreadsheet.
reproducibleWhere a simulation over scenarios is required, the generator runs with a constant seed. The same inputs always give the same answer.
a stable answerFormulas by calculator
- Losing trades in a row
- A dynamic over the length of the current run: the state is the number of losses in a row from 0 to K−1, a winning trade resets the state. The answer = 1 − the probability of never reaching length K. The naive formula over independent windows overstates the result.
- Break-even win rate
- p = (1 + c) ÷ (1 + R), where R is the risk/reward ratio and c the costs as a share of risk. Trade expectancy: p × (R − c) − (1 − p) × (1 + c).
- The cost of a drawdown
- Growth required = D ÷ (1 − D). The number of trades is calculated through the average logarithmic gain: ln(1 + growth) ÷ [p·ln(1 + r·R) + (1 − p)·ln(1 − r)].
- The cost of revenge trading
- Risk at step n = base risk × multiplier to the power n−1; the balance is multiplied by (1 − the step's risk). The calculated risk is capped at 100 %: you cannot put more than the deposit into a trade.
- Risk of ruin
- A simulation of 8,000 scenarios. Equity is multiplied by (1 + r·R) on a win and by (1 − r) on a loss; the scenario stops on reaching the given drawdown from the high. The result is shown as a median, not a mean.
- The cost of overtrading
- Costs = size × (spread × point value + commission) + size × swap × nights. The break-even threshold in points = costs ÷ (size × point value).
- Map of your breakdowns
- Not a psychometric instrument. Marks are counted across five groups; the leading scenario is the one with three or more matches. A total of 12 or more triggers a separate verdict regardless of the distribution.
- The cost of one breakdown (home page widget)
- overpayment = (risk × multiplier − risk) × number of cases per month × 12. Trades needed to recover = overpayment ÷ (risk × ratio). With zero cases the verdict says there is nothing to calculate rather than producing a cheerful result from empty inputs.
Assumptions adopted in all the calculations
How to read a model number
All the figures in the site's calculations are models. That is not a lawyer's caveat but an instruction on how to use them.
a win rate of «about 45 %» gives an expectancy of «about +0.35 R», not +0.3500 R
What we do when an error is found
The numbers on the site are linked: one quantity surfaces in the text of several materials, in the calculation teasers and in the diagram captions. That is why a correction is a procedure rather than the editing of a paragraph.
Repeat the calculation by the formula from the page with the same inputs. If there is no discrepancy, we reply to the author of the message with an explanation.
1–2 daysAn error can be in the formula, in the implementation or in an assumption. Three different cases with different depths of consequence.
as it happensA search for the number across all parts of the generator: pages, teasers, diagram captions, specs in schemes_data.
mandatoryThe edit goes into the source parts, not into the finished HTML: otherwise the next build brings the error back.
one commandAn audit of lengths and keywords, page uniqueness, JSON-LD validity, a check of links and assets.
after every fixIf a correction changes a material's conclusion, a note stays in the text of the page. Such edits are not made silently.
when requiredWhere the inputs come from
The win rate, the risk/reward ratio and the costs have to be taken from your own journal on a sample of no fewer than thirty trades. Values from a strategy description will not do: they were calculated on different data and without your rule violations.
The default values in the calculators (win rate 45 %, ratio 1:2, risk 1–2 %) were chosen as plausible for illustration and are not a recommendation.
How to check our calculation
2. Repeat it in your own spreadsheet with the same inputs
3. Compare it with what the screen showed
if they differ, we have a defect; write to us about it
For calculations that simulate scenarios an exact match is impossible, but the order of magnitude should agree. Error reports are accepted through the contact form and are handled first.
Frequently asked questions
Why are taxes not included in the calculations?
Because rates and rules depend on the country and on a person's status, and any hard-wired value would be wrong for most readers. Broker costs are included, taxes are not.
May I use these formulas in my own spreadsheet?
Yes, that is exactly why they are given openly. We claim no authorship of the arithmetic: the formulas are standard, and the value here is in the selection and in the honestly stated assumptions.
Why are the default numbers what they are?
They are plausible values for illustrating the mechanics, not a recommendation and not a typical result. Take your own values from your journal.