Limits Tracking
MarketGrid can keep track of the current value of orders and trades for Firms, Users and Accounts and can manage trading limits against those. Management of these positions and limits is independent of the management of Holding balances. Both holdings and limits tracking may be enabled or disabled separately.
In each of the Firm, User and Account tables, the following fields are used for positions and limits:
| Field | Description | ||||
|---|---|---|---|---|---|
| MaintainPositions | If enabled, causes aggregate buy and sell values (positions) to be maintained. | ||||
| CheckLimits | If enabled, indicates that limit checking is to be applied to orders and trades. For limit checking to be enabled, MaintainPositions must also be set in order that positions are maintained. | ||||
| WarnPercent | A number between 0 and 100. If non-zero, defines the level (as a percentage of limits set) at which a warning will be issued for any of the trading limits. Only used if CheckLimits is set. | ||||
| ActualBuyVal | If MaintainPositions is set, this is the current aggregate value of buy trades. It is maintained as a whole value with no implied decimals. This will be maintained across System cycles so may need to be reset or adjusted externally at the start of each day (or period). | ||||
| ActualSellVal | If MaintainPositions is set, this is the current aggregate value of sell trades. It is maintained as a whole value with no implied decimals. This will be maintained across System cycles so may need to be reset or adjusted externally at the start of each day (or period). | ||||
| BuyValLimit | Aggregate buy value limit as a whole number with no implied decimals. Set to 0 if no buy limit. | ||||
| SellValLimit | Aggregate sell value limit as a whole number with no implied decimals. Set to 0 if no sell limit. | ||||
| NetValLimit | Net value limit as a whole number with no implied decimals. This is a limit on the Net value of buy trades less value of sell trades. Set to 0 if no net limit. | ||||
| GrossValLimit | Gross value limit as a whole number with no implied decimals. This is a limit on the accumulated value of all trades and planned orders. Set to 0 if no gross limit. |
In addition, the Matching Engine uses the following fields as working fields for its real-time position keeping and limit management:
| Field | Description |
|---|---|
| PlannedBuyVal | If MaintainPositions is set, this is the current aggregate value of outstanding buy orders. It is maintained as a whole value with no implied decimals. |
| PlannedSellVal | If MaintainPositions is set, this is the current aggregate value of outstanding sell orders. It is maintained as a whole value with no implied decimals. |
Limit Values
For each order and trade, the SettlementValue of the order or trade is used for aggregation.
Currencies
Since an aggregate value is maintained across all buy and sell trades (and orders), the value for each trade or order must be normalised to a single Currency in order for the aggregate value to make sense.
Firms
The values of individual orders and trades will be converted to the SettlementCurrency configured for the Firm. Limits and positions are set and tracked in this currency.
Users
The values of individual orders and trades will be converted to the SettlementCurrency configured for the User, if one is set, otherwise the SettlementCurrency of the User's Firm is used.
Accounts
The values of individual orders and trades will be converted to the SettlementCurrency configured for the Account, if one is set, otherwise the SettlementCurrency of the Accounts's Firm is used.
Checking
If CheckLimits is set for a particular Firm, User, or Account, the positions for that entity will be checked against its set limits for every incoming order. Any order that would cause a limit to be breached will be rejected.