...
Important: Make sure the Formula Type is set to "Per Execution" when creating a plan.
The following variables are available when creating a Per Execution formula:
Variable Name | Description |
---|---|
$source | A numeric code indicating where the execution originated. See the list of source ids. |
$date | The trade date in YYYY-MM-DD format (e.g. 2011-08-15). |
$time | The trade time in HH:MM:SS format (e.g. 09:35:12). If the trade time is uknown, the variable is set to 00:00:00. |
$type | B = Buy, S = Sell, T = Short, C = Cover. See side and intention codes for more information. |
$quantity | Number of shares or contracts traded. |
$symbol | Ticker symbol of the instrument being traded. |
$currency | Currency code of the trade (3-character ISO code). |
$multiplier | The multiplier (can be called "contract size" for options and "value multiplier" for futures) used when computing profit and loss. |
$listingExchange | Listing exchange for the security being traded (see list of exchange codes). |
$spotRate | The conversion rate from the trade currency to the account currency. |
$price | Price of the trade. |
$value | Value of the trade in the currency of the account. |
$execBroker | MPID / identifier of the executing broker. Will always be in uppercase. |
$contra | MPID / identifier of the counterparty. Will always be in uppercase. |
$route | Name of the route, ECN or exchange. Will always be in uppercase. |
$internalContra | Indicates the actual counterparty when an order is routed via an order desk or another intermediary (when available). (v1.5.98.19.16 or greater) |
$internalRoute | Indicates the actual destination when an order is routed via an order desk or another intermediary (when available). |
$internalLiquidity | Indicates the actual liquidity flag when an order is routed via an order desk or another intermediary (when available). |
$liquidity | Liquidity flag. |
$capacity | Trading capacity of the order (when available). A = Agency, P = Principal, R = Riskless Principal. |
$originalCommission | Commission as received from the data source. |
$originalExchangeFee | Exchange/ECN fee as received from the data source. |
$originalSecFee | SEC transaction fee as received from the data source. |
$originalTaf | Trade activity fee as received from the data source. |
$originalNsccFee | National Securities Clearing Corporation fee as received from the data source. |
$originalMiscellaneousFee | Miscellaneous fee as received from the data source. |
$originalClearingFee | Other clearing fee as received from the data source. |
$originalOrf | Options Regulatory Fee as received from the data source. (v1.5.98.19.16 or greater) |
$originalAccessFee | Exchange access fee as received from the data source. (v1.5.98.19.16 or greater) |
$originalNfaFee | National Futures Association fee as received from the data source. (v1.5.98.19.16 or greater) |
$orderQuantity | Total quantity for the order. Set to 0 for all but the last execution for the order. Note that if an order contains a fill with a manually set fee, this variable will always be set to 0 for that order. |
$monthlyVolume | Total cumulative quantity traded during the trade date month up to and including the execution being processed. |
...
The quantity is for the instrument type of the execution being evaluated. For example, if a formula is being evaluation for an equity, monthlyVolume will equal total equity shares the account traded from the beginning of the month up to and including the execution processed. |