Durable reference map
A three-stage method to reuse whenever conditions change
Keep the sequence of inputs, calculation and exception testing stable instead of relying on a market forecast.
- Align inputs and unitsGo to equations and definitionsOne-lot loss in account currency・Quantity after conversion
- Reconcile the worked exampleGo to table and calculation stepsConverting a USD 400-per-lot stop loss into a JPY account
- Test exceptions and next checksGo to rules and counterexampleDisplay profit currency, account currency and rate units on every calculation.
Separate the three currencies before calculating
An instrument has a base currency, a quote or profit currency, and an account currency. Omitting whether pip value is already JPY or still USD creates either double conversion or no conversion.
The example’s USD 10 per pip per lot is a profit-currency value. Forty pips first become USD 400 per lot; only then is that amount converted to JPY.
- Currency code of the loss amount
- Account home currency
- Rate direction and gain/loss field
Let unit cancellation choose multiplication
Multiplying USD 400 by JPY 150/USD cancels USD and leaves JPY 60,000. If the only available quote is the reciprocal 0.00666667 USD/JPY, divide the USD amount by that rate. Direction comes from units, not from whether a number looks large or small.
- USD × JPY/USD = JPY
- USD ÷ USD/JPY = JPY
- Save both the field name and the API definition
Freeze the loss-side factor and timestamp
When an API separates gain and loss home-conversion factors, use the loss factor for a loss estimate. Bid/ask and conversion path can make them different.
Preserve calculation, rate, order and fill times independently. The factor at sizing reproduces the decision; the factor at fill reconciles realized account P&L.
- Rate source and instrument path
- An unambiguous timestamp such as RFC 3339
- Maximum accepted rate age
Do not call a reference rate an execution rate
A central-bank reference series can verify quote direction and a daily observation, but it may be expressly unsuitable for transactions. Use the factor applicable to the account and conversion path for order sizing.
Keep adjacent timestamp problems separate
Article 3 addresses stale balance or equity, the denominator of the risk rate. This article addresses direction and time of the conversion factor. Article 11 establishes contract and tick loss before conversion. Do not collapse all three into a generic “latest value” field.
- Article 11 establishes profit-currency loss
- This article converts it to account currency
- Article 3 checks the equity timestamp used with that loss
Round size down again when the factor changes
The same USD 400 per lot becomes a different JPY loss at 145, 150 or 160 JPY/USD. Calculate a raw lot for each factor, round down to 0.01, and compare the resulting JPY loss.
Calculation framework
One-lot loss in account currency
Read the role of each equation first, then follow the numerical example to check the decision path.
One-lot loss in account currency
L_account = L_profit × R_account_per_profit- L_profit: one-lot loss in the profit currency
- R_account_per_profit: loss-side account-currency units per one profit-currency unit
In plain language: Profit-currency units cancel, leaving only account currency.
When this conclusion does not apply: Calculate only when L_profit is non-negative and R_account_per_profit is positive. If only the reciprocal rate exists, invert it or divide and retain full precision.
Quantity after conversion
Q = floor_step(B_account / L_account)- B_account: loss budget in account currency
- floor_step: downward rounding to the permitted lot step
In plain language: This solves quantity from the converted one-lot loss.
When this conclusion does not apply: Calculate only when B_account is non-negative and L_account and the volume step are positive. If the rate is older than the declared tolerance, retrieve it again rather than outputting a lot.
Identify profit currency before converting to account currency
A position can involve a base currency, a quote or profit currency, and an account currency. The monetary value field must say which one it already uses. In the example, USD 10 per pip per lot is a profit-currency value, while the loss budget is JPY. Omitting that distinction invites either no conversion or a duplicate one.
The stop is 40 pips, so price-distance loss is first 40 times USD 10, or USD 400 per lot. That result should be preserved as the preconversion amount. Only then is it transformed by a JPY-per-USD loss-side factor into an account-currency denominator for quantity.
If a platform already returns a correctly timestamped tick value in JPY, multiplying by another JPY-per-USD factor would double-convert the loss. Field names alone may be ambiguous, so the record should include value, currency, unit expression, source field, and calculation path.
Let unit cancellation determine multiplication or division
USD 400 multiplied by JPY 150 per USD cancels USD and leaves JPY 60,000 per lot. The direction is justified by units, not by whether 150 looks like a familiar exchange rate. Writing units beside every factor prevents reciprocal quotes from being applied by intuition.
If the available field is 0.00666667 USD per JPY, dividing USD 400 by that factor also leaves JPY. Inverting once at full precision is equivalent. Inverting twice or multiplying by the reciprocal would instead produce a meaningless squared-currency expression or a vastly wrong quantity.
API labels such as home conversion or quote conversion should be checked against their documentation. A factor can be designed to multiply a quote-currency amount even when a screen convention displays the reciprocal. The schema’s declared units govern the operation, not the trader’s usual way of reading the pair.
A triangulated path needs the same discipline across both legs. Each intermediate currency, quote direction, full-precision factor, and timestamp should be retained. Multiplying two convenient screen rates without unit cancellation can produce a final JPY label while embedding an inverted leg that no later reviewer can detect.
Use the loss-side factor for a loss estimate
Some provider schemas distinguish gain and loss home-conversion factors because bid, ask, and conversion paths can produce different outcomes. A protective-loss calculation should use the loss-side factor specified for that purpose. Substituting a gain factor can systematically understate or otherwise misstate account-currency exposure.
The record should preserve both the field name and rate unit. A generic midpoint can be useful for a transparent scenario but should not be labeled the executable loss conversion if the account applies another factor. The difference belongs in sensitivity or reconciliation rather than being hidden by rounding.
A negative loss amount should not be passed through as though it were a gain. Construct nonnegative price-distance loss first, then apply a positive conversion factor. Favorable realized P&L belongs to its own path. This sign discipline keeps the sizing denominator positive and prevents an invalid negative lot.
Freeze rate and calculation times independently
The conversion factor has a timestamp that can differ from calculation, order, acknowledgment, and fill times. The sizing record should preserve the factor available when quantity was decided. The fill record can use the provider’s execution-time factor to reconcile realized account P&L without rewriting the earlier input.
A later rate may reproduce today’s account statement but cannot prove what the system knew earlier. Conversely, retaining an old factor beyond the declared freshness tolerance can make a new lot stale. Each calculation needs an allowed-age rule and a failure response when the loss-side factor cannot be refreshed.
Timezone and quote-source timestamps also matter. A daily reference published at a stated time is not an order-time transaction rate. The data source, observation time, retrieval time, and intended use should remain distinct so informational series are not presented as live executable conversion.
Replay three hypothetical rates through the same USD loss
Holding USD 400 per lot, JPY 12,000 budget, and 0.01 step constant isolates the conversion factor. At 145 JPY per USD, one-lot loss is JPY 58,000 and raw size is about 0.20689655, rounded down to 0.20. The checked loss is JPY 11,600. Full precision remains available for the replay.
At 150, one-lot loss is JPY 60,000 and raw and executable size are 0.20 lot, replaying exactly to JPY 12,000. At 160, loss per lot becomes JPY 64,000; the 0.1875 raw result rounds down to 0.18 and replays to JPY 11,520. The size change comes from the denominator, not a forecast.
All rates are hypothetical and are not forecasts or live quotes. The table shows that a rate change can leave the rounded lot unchanged across one interval and lower it across another. Retaining the raw quantity reveals this execution-grid effect even when the displayed result stays at 0.20.
Separate rate sensitivity from stale-equity sensitivity
A conversion factor changes loss per lot, the denominator of the quantity calculation. Current equity changes the account-currency budget when a percentage policy is used. Both are time-sensitive, but they are not the same latest-value problem. Updating one while leaving the other stale creates a mixed-time result.
The calculation record should therefore show capital timestamp, conversion timestamp, specification timestamp, and order time independently. A single last updated badge cannot prove temporal alignment. Different tolerances may apply because market conversion can change faster than statement balance or contract fields.
Daily remaining capacity is another separate ceiling. Even a current rate and current equity do not authorize more than the unconsumed daily ledger. The interface should show which constraint binds rather than compress conversion, capital, and temporal budget into one opaque availability amount.
A sensitivity table should hold the USD loss and JPY budget fixed when varying the conversion factor. It can then show raw-lot movement where 0.01-step rounding leaves the same displayed quantity. This avoids interpreting a flat order grid as evidence that currency conversion is economically irrelevant.
Keep contract reconstruction before currency conversion
The USD 10 pip value must itself be verified from the product specification or provider field. Conversion cannot repair a wrong contract size, tick convention, or pip unit. First determine profit-currency loss per lot, then convert that amount to account currency, and only afterward apply minimum and step constraints.
If a symbol reports loss tick value directly in account currency, the reconstruction path may be shorter, but reconciliation is still useful. Compare contract and tick economics with the returned account value and identify whether the platform already incorporated current conversion. A mismatch should stop the order rather than invite an extra factor.
Nonlinear products or tiered values can require scenario-specific calculations. The simple USD 400 result assumes constant USD 10 per pip per lot across 40 pips. That educational assumption should not be transferred to an instrument whose value varies with price or whose P&L method differs.
Handle costs in their original and final currencies
Commission and financing can be charged in account, base, or quote currency. Each amount should be converted once using the documented path and then combined in account currency. Summing USD price loss with a JPY fee before conversion creates an arithmetically possible but unitless total.
Known fixed costs can reduce the JPY budget, while per-lot charges increase JPY loss per lot. If conversion factors differ by currency or timing, retain them separately. A spread already embedded in fill prices should not be deducted again as a fee merely because the platform reports an informational spread field.
The example excludes costs to isolate rate direction. That omission should remain visible in every summary. Setting an unknown charge to zero without evidence can make a rounded 0.20 lot appear to fit exactly at JPY 150 per USD when the true all-in estimate would require stepping down.
If a charge is denominated in a third currency, its conversion path should not be borrowed from the P&L factor without checking units and side. Separately converted components can then be summed in JPY, making it possible to attribute later variance to product loss, fees, or FX translation.
Attack reciprocal, double-conversion, and stale-rate errors
A reciprocal test supplies both JPY per USD and USD per JPY and verifies that the two paths reproduce the same JPY loss within declared precision. A double-conversion test marks the pip value as already JPY and ensures the system rejects another factor. These errors can change size by enormous multiples while leaving familiar currency labels on screen.
A gain-versus-loss test supplies distinct provider factors and confirms that the protective estimate selects the loss field. A stale-rate test moves the calculation beyond its freshness tolerance and expects no new lot. Falling back silently to the prior factor would create a current-looking order from outdated monetary sensitivity.
Boundary tests include zero or negative rate, missing currency code, unsupported conversion path, nonpositive loss per lot, and negative budget. The safe result is unavailable or zero where defined. An infinite or negative quantity should never be normalized into a positive order by absolute value or display formatting.
Use reference rates only for the purpose they support
A central-bank reference series can help verify quote direction, publication convention, and a daily observation. If the source warns that rates are informational, it should not be labeled an executable order-time factor. The page can use it for unit education without asserting transaction availability.
Production sizing should use the factor applicable to the account and conversion path, with provider documentation and timestamp. A reference and provider rate can be compared for diagnostics, but choosing whichever produces the larger preferred lot would be outcome-driven. The selected source and purpose need a prospective rule.
Historical reproduction also requires the factor used at the time, not a later reference revision. Keep raw source value, units, timestamp, and transformation. A rounded display such as 150 may be insufficient if the underlying full-precision rate affects a step boundary.
The evidence record should distinguish retrieval failure from an unchanged fresh rate. Reusing the prior value after a failed request can make the result look stable, while a genuine new observation can legitimately match. Only the latter supports a current calculation under the stated refresh rule.
Build a ledger that shows every currency cancellation
The record needs instrument currencies, account currency, stop and pip unit, profit-currency value per pip per lot, preconversion loss, factor value and unit, rate source and time, account-currency loss per lot, budget, raw lot, step, rounded lot, and checked account-currency loss.
A calculation-path field should state whether conversion was direct, reciprocal, triangulated, or already embedded in the provider tick value. Triangulation needs every leg and timestamp. This lineage prevents a later reviewer from applying an additional factor simply because the final number lacks an obvious currency origin.
Corrections append a new version. If a rate or currency label was wrong, the affected order decisions should be identified rather than silently recomputed. The original record documents the operational error; the corrected record supports remediation and shows whether quantity would have crossed a budget boundary.
Reconcile fills with their execution-time home conversion
After execution, provider transaction records can include home-conversion factors and exact prices for opened, reduced, or closed trades. Those fields support realized account-currency reconciliation. They should be linked to the original calculation rather than used to claim that the later rate was available before the order.
Variance can arise from a changed factor, different fill distance, partial quantity, fees, or contract value. Decomposing each component avoids calling every JPY difference an FX effect. The original USD 400-per-lot assumption and selected factor remain available for a clean expected-versus-realized bridge.
A favorable conversion movement does not validate an older stale factor, and an unfavorable one does not prove the sizing method failed. Review should test whether the factor met the declared freshness and source rules at decision time, then separately assess the distribution of execution-time differences.
Read provider and central-bank documentation within scope
OANDA pricing documentation supports separate gain and loss factors and states how quote-currency amounts are converted to home currency. Transaction documentation supports preserving factors at fill. ECB material supports explicit quote direction, publication time, and the limitation that reference rates are informational.
None of those sources provides the hypothetical USD 400 loss, JPY 12,000 budget, or 145, 150, and 160 scenarios. They do not guarantee that another provider exposes identical fields. Current schema and account behavior must be verified before importing the calculation path.
The source-backed conclusion is structural: identify currency, direction, use, and time for every factor. The three rate rows are derived examples showing how executable quantity can change. They are not forecasts of USD/JPY or recommendations about currency exposure.
State the conversion result without claiming a live rate
Under the hypothetical 150 JPY-per-USD loss-side factor, USD 400 per lot becomes JPY 60,000 and a JPY 12,000 budget supports 0.20 lot. At 160, the raw result falls to 0.1875 and the 0.01-step quantity becomes 0.18, replaying to JPY 11,520. Both remain scenario outputs rather than live-rate claims.
The direction follows unit cancellation, and the timestamp determines which factor belongs to the decision. If the platform value is already in JPY, another conversion is wrong. If the required rate is stale or its unit cannot be verified, no new executable lot should be presented as current.
This arithmetic does not predict exchange rates, recommend a quantity, or guarantee the stop loss. It demonstrates a reproducible path from profit-currency loss to account-currency exposure while keeping specification, capital, cost, and execution uncertainties visible as separate constraints.
A validator can multiply saved preconversion loss by the saved account-per-profit factor and compare it with the displayed denominator, then replay the rounded lot. That two-stage invariant catches rate-direction and order-rounding errors without assuming that the hypothetical factor is a live quote.
Decision and control rules
- Display profit currency, account currency and rate units on every calculation.
- Use the loss-side home-conversion factor for a loss estimate.
- Separate calculation, rate, order and fill timestamps.
- Do not substitute an informational reference rate for a live execution factor.
- After conversion, round lot down and recompute account-currency loss.
Common failure modes
- Confusing JPY/USD with USD/JPY from the field name alone
- Applying an FX factor to a tick value already in JPY
- Using a gain factor for a loss
- Calling a daily reference rate a live order-time rate
- Reproducing an old calculation with a later rate
Evidence and specifications
- OANDA REST v20 — Pricing Definitions
What this source supports: The official pricing schema defines separate gain and loss factors for converting quote-currency amounts into account home currency and states that the amount is multiplied by the factor.
- OANDA REST v20 — Transaction Definitions
What this source supports: The transaction schema records home-conversion factors in effect at OrderFill and identifies the exact or official price on each opened, reduced or closed trade.
- European Central Bank — Euro Foreign Exchange Reference Rates
What this source supports: The ECB states that its rates quote currencies against the euro, gives the usual publication time and warns they are for information, supporting explicit direction, timestamp and use.
Questions to resolve
If USDJPY is 150, is multiplication always correct?
It is correct when the field means JPY 150 per USD. If an API returns the reciprocal or a home-conversion factor, follow that documented unit.
Can I use an ECB rate for order sizing?
The ECB describes its reference rates as informational. Use the factor applicable to the account, side, path and timestamp for the actual sizing decision.
Which rate is correct when calculation and fill differ?
The calculation-time factor reproduces the pre-trade decision; the fill-time factor reconciles realized P&L. Preserve both.
Is this the same as stale equity?
No. Equity is the denominator of the risk budget. This factor translates loss from one currency to another; test their timestamps separately.
Recalculate from current inputs
In the Lot Size Calculator, expose pip-value currency and the loss-factor unit and timestamp, then verify the converted JPY loss.
Important: This is educational material on conversion direction and timing. It does not provide a live or forecast rate or recommend a lot; API factors, spreads and conversion paths vary by account and time.