About

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

01All quantities in plain view

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 quantities
02The calculation runs in the browser

The numbers you enter are not sent to a server and are not stored anywhere except on your device.

locally
03The formula is stated openly

On every page the expression is given with the numbers substituted. The result can be repeated in a spreadsheet.

reproducible
04Randomness is deterministic

Where a simulation over scenarios is required, the generator runs with a constant seed. The same inputs always give the same answer.

a stable answer

Formulas 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

assumptionTrades are independentIn reality they are linked through the market regime: in one phase unfavourable conditions for your setup come in runs. Because of that actual runs are usually longer than calculated.
assumptionThe win rate and the ratio are constantIn fact they change over time and with changes to the strategy. The calculation describes a period in which they are stable.
assumptionRisk is strictly fixedIf the actual risk wanders from trade to trade, the calculation has to use the maximum rather than the average — otherwise the result is more optimistic than reality.
consequenceThe model is optimisticAll three assumptions shift the result in a favourable direction. The actual risk of ruin and the actual depth of a drawdown are usually higher than calculated.

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.

correctAs an order of magnitude«Revenge trading costs five times more than constant risk» is a stable conclusion; it does not change whether the figure is 50.6 % or 48 %.
correctAs a comparison of two optionsThe model answers well the question «what happens if one parameter is changed», because everything else is held fixed.
incorrectAs a forecast of your own resultThe model calculates the consequence of your inputs. The inputs are a hypothesis about the future, and the main assumption in them is that the edge will hold.
incorrectAs an exact number to two decimal placesThe spread of the observed win rate on a sample of thirty trades is about ±17 points. The precision of a result cannot exceed the precision of the inputs.
precision of the conclusion ≤ precision of the inputs
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.

01Reproduce

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 days
02Localise

An error can be in the formula, in the implementation or in an assumption. Three different cases with different depths of consequence.

as it happens
03Find every occurrence

A search for the number across all parts of the generator: pages, teasers, diagram captions, specs in schemes_data.

mandatory
04Fix and rebuild

The edit goes into the source parts, not into the finished HTML: otherwise the next build brings the error back.

one command
05Run the checks

An audit of lengths and keywords, page uniqueness, JSON-LD validity, a check of links and assets.

after every fix
06Mark what is substantial

If a correction changes a material's conclusion, a note stays in the text of the page. Such edits are not made silently.

when required

Where 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

1. Copy the formula from the calculation page
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.

APTF logo
APTF editorial teamWe examine trading psychology where it shows up in the statement: the price of one broken plan, the probability of a run of stops, the cost of revenge trading and of overtrading. We give the formulas in full so that every calculation can be repeated in your own spreadsheet.Who writes and how we verify the dataData verified: