Account Summary & Custom Formulas

Custom formulas for filtering

One might want to use this technique when monitoring multiple accounts for risk conditions, and filter a view to just those accounts that meet the condition.

  • Have both the Account Summary and the new Formulas widget open
  • Create a new formula by hitting the + button in the toolbar, the Formula dialog will open.
  • Give your formula a name
  • Use the prefix "account." for different account values and simple math operators to construct a formula
  • In this example, we are creating a filter to show accounts with a negative balance
  • To use the formula as a filter, check the "Condition" box
  • Save the formula
  • Go to the filters menu in the Account Summary view and choose the filter you just created

Custom formulas for custom columns

One might want to use this technique to create a column to display some risk algorithm that indicates when accounts might be getting into trouble.

  • From the task menu, or from the +Column tab in the Column manager dialog, create a new formula, the formula dialog will open.
  • Give your formula a name
  • Use the prefix "account." for different account values and simple math operators to construct a formula
  • In this example, we are creating a column showing purchasing power minus margin, shown as a percentage
  • Save the formula
  • Because we started the formula from the +Column tab, once the formula was saved it was added to the "In window" tab

Here are two tables detailing common uses of this functionality: The first table groups the Formula Fields, and the second table lists the Formula Fields in alphabetical order.

For a more comprehensive presentation, download the pdf CQG_Account_Alert_Formula_Reference-1. This document was assisted by AI and reviewed by Jim Stavros.

Available Account Formula Fields

CategoryFormula FieldDefinition
Core Account Valuesaccount.currentBalanceAccount balance (cash balance in the account)
account.nlvNet Liquidation Value (total value of the account including positions)
account.oteOpen Trade Equity (unrealized P&L for futures positions)
account.mvoMarket Value of Options (value of option positions)
account.uplUnrealized Profit/Loss (specifically for options)
account.pl or account.profit_lossProfit/Loss
account.collateralCollateral on Deposit
Margin Related Fieldsaccount.margin or account.margin_valueTotal margin value/requirement
account.margin_excessMargin Excess (calculated as: purchasing power - total margin value)
account.purchasing_powerPurchasing Power (calculated as: balance + MVO + OTE)
account.margin_creditMargin Credit
account.cash_excessCash Excess
Calculated Valuesaccount.ote_plOTE + P/L combined

Key Definitions

TermDefinition
Purchasing PowerBalance + MVO + OTE
Margin ExcessPurchasing Power - Total Margin Value
NLV (Net Liquidation Value)Total account value including all positions
OTE (Open Trade Equity)Unrealized profit/loss on futures positions
MVO (Market Value of Options)Current market value of option positions
UPL (Unrealized Profit/Loss)Specifically for options

Notes:

  • Values that change in real time include Balance, OTE, P/L, UPL, MVO, and NLV.
  • Margin data is refreshed automatically when updated by your broker.
  • Some values may display "N/A" when margin data is unavailable or when the margin subsystem is disabled for the account.

Account Value in Alphabetical Order

Account Value in Alphabetical OrderSimple Explanation
account.cashExcessCash available above the amount required for margin. Think of it as your extra cash cushion.
account.currentBalanceYour current account balance. Basically, the cash amount currently recorded in the account.
account.longOpenPositionsQtyThe total quantity of long positions currently open — trades where you expect the price to rise.
account.marginThe amount of margin currently required to support your open positions.
account.marginCreditA credit applied toward your margin requirement, depending on the broker/account setup.
account.marginExcessThe amount of margin you have available above the required margin. It represents your margin safety cushion.
account.minDaysTillPositionContractExpirationThe minimum number of days until one of your open contracts expires.
account.mvoMarket Value of Open positions — the current market value of your open positions.
account.netChangePercentThe percentage change in your account value, usually compared with a previous/reference value.
account.netLiquidationValuePercentNet Liquidation Value expressed as a percentage, usually relative to a reference value.
account.noMultiplierPositionMarginPosition margin before applying the contract multiplier. Useful for seeing the underlying margin calculation.
account.openTradeLossUnrealizedLossThe current unrealized loss from open trades. The loss isn't final until the position is closed.
account.oteUplOpen Trade Equity / Unrealized P&L — the current profit or loss from positions that are still open.
account.oteUplAndPlUnrealized P&L + realized P&L. Combines open-trade results with profit/loss from completed trades.
account.positionMarginThe margin required for your current positions. This is collateral tied up to support the trades.
account.profitLossYour profit or loss. Positive means profit; negative means loss.
account.purchasingPowerThe amount you can potentially use to open new positions, based on your available funds and leverage.
account.shortOpenPositionsQtyThe total quantity of short positions currently open — trades where you expect the price to fall.
account.totalFilledQtyThe total quantity of orders that have been successfully executed/filled.
account.uplUnrealized Profit/Loss — the current profit or loss on positions that are still open.
account.yesterdayBalanceYour account balance at the end of the previous trading day.
account.yesterdayCollateralThe collateral held or required yesterday to support your trading positions.
account.yesterdayMvoMarket Value of Open positions yesterday — the value of your open positions at the previous day's reference point.
account.yesterdayNetLiquidationValueYour Net Liquidation Value yesterday — approximately what your account was worth if positions were closed at that time.
account.yesterdayOldestMarginCallAgeDaysHow many days old your oldest outstanding margin call was as of yesterday.
account.yesterdayOteYesterday's Open Trade Equity — the unrealized profit/loss on positions that were open at that time.
account.yesterdayTotalOutstandingMarginCallsThe outstanding margin calls from yesterday. A margin call means additional funds/collateral may have been required.

AI was used for this table.

Formula Operators

Currently formula editor supports elementary operations:

"||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%"

"-", "!", "~", "+"

Parentheses are also supported.

  • Math operators
  • Unary negation ( - )
  • Unary plus ( + )
  • Multiplication ( * )
  • Division ( / )
  • Subtraction ( - )
  • Remainder ( % )

 

Comparison operators

  • Equals ( == )
  • Not equals ( != )
  • Less ( < )
  • Greater ( > )
  • Less OR Equal ( <= )
  • Greater or Equal ( >= )

 

Boolean operators

  • OR ( || )
  • AND ( && )
  • NOT ( ! )

 

Bitwise operators

  • AND ( & )
  • OR ( | )
  • XOR ( ^ )
  • NOT ( ~ )
  • LEFT SHIFT ( << )
  • RIGHT SHIFT ( >> )
  • ZERO-FILL RIGHT SHIFT ( >>> )