Per Symbol

Trade fee formulas use a simple language (a modified version of the PHP programming language) to specify how fees should be assessed in PropReports.  

A "Per Symbol" formula runs once for every instrument traded per day and the result is saved as the fee on the last fill for that day.  

The formula will NOT run for any instruments that contain an execution with fees manually set.  Canceled executions or those with a status that is not regular are disregarded and not included in any of the totals.

(warning) Important: Make sure the Formula Type is set to "Per Symbol" when creating a plan.

The following variables are available when creating a Per Symbol formula:

Variable Name

Description

$date

The trade date in YYYY-MM-DD format (e.g. 2011-08-15).

$quantity

Total shares or contracts traded in this symbol.

$quantityBought

Total shares or contracts bought.

$quantityBoughtToOpenShares or contracts bought to open a long position. First execution has side/intention set to B. 
$quantityBoughtToCloseShares or contracts bought to cover a short position. First execution has side/intention set to C. 
$quantitySold

Number of shares or contracts sold.

$quantitySoldToOpenShares or contracts sold to open a short position. First execution has side/intention set to T. 
$quantitySoldToCloseShares or contracts sold to close a long position. First execution has side/intention set to S.
$orderCountTotal number of orders in this symbol. This is determined by the Order Id on each execution.
$symbolTicker symbol of the instrument being traded.
$multiplierThe multiplier (can be called "contract size" for options and "value multiplier" for futures) used when computing profit and loss.
$listingExchangeListing exchange for the security being traded (see list of exchange codes).
$spotRateThe conversion rate from the trade currency to the account currency.
$dailyValueBoughtValue of all purchase transactions in this symbol in the currency of the account.
$dailyValueSoldValue of all sale transactions in this symbol in the currency of the account.


(warning) Important: The order intention quantities (quantityBoughtToOpen, quantitySoldToClose, etc) are based on how executions are marked in the data being imported.  Not all data sources send the intention of the trade.