riskLimits, so you can
show a trader exactly where the account stands without re-implementing the
rules:
maxLossFloor: the balance at which the account fails.dailyLossFloor: the balance at which the trading day ends.profitTarget: the balance at which the profit target is reached.
Where to read them
All of them need view permission on traders.
Fields
riskLimits is null when Hyperprop has no live limits for the account, for
example one that is no longer active. On the account read with
include=floors it is also null if the live values cannot be read at that
moment; the rest of the account is returned as usual.
Floor types
A drawdown set in percent is applied to the same reference (initial balance,
peak equity or highest end-of-day balance). When the rule has a trail ceiling,
a trailing or end-of-day floor stops at
initialBalance + ceiling and
trailingLocked becomes true.
Examples
For a 50,000 account:
With a day starting at 50,100 and a daily loss limit of 1,000,
dailyLossFloor is 49,100. Once the daily loss limit is switched off,
dailyLossFloor is null, dailyLossLimitActive is false and
dailyLossLimitOff is true.
When a floor is reached
Limits are judged on equity after the estimated closing fees, sodistanceToMaxLoss and distanceToDailyLoss already include them:
maxLossFloor: the account fails whendistanceToMaxLossreaches 0 (for a drawdown limit, once it is below 0). Open positions are closed.dailyLossFloor: whendistanceToDailyLossreaches 0, open positions are closed and trading stops until the next daily reset. The account does not fail.profitTarget: reached when equity after the estimated closing fees is at or above it. Passing can also depend on other rules of the account, such as consistency.
RiskLimitsUpdate (the floors) with
AccountUpdate (equity) on the stream.