| 
 
  | 
| 
 Description  | 
 This formula calculates the profitability of a position in an option or underlying instrument. 
 Profitability is the difference between the purchase price and the current price multiplied by the quantity purchased.  | 
| 
 
  | 
 
  | 
| 
 Formula  | 
 Profit(CurrentPrice, PurchasePrice, Quantity)=begin retval = Diff(CurrentPrice, PurchasePrice) * Quantity end  | 
| 
 
  | 
 
  | 
| 
 Parameters  | 
 The number of arguments in this formula may vary. 
 The arguments are $n references, i.e., 
 Profit($1, $2, $3, $4, $5)  | 
| 
 
  | 
 
  | 
| 
 Return Value  | 
 A profit value.  | 
| 
 
  | 
 
  | 
| 
 Examples  | 
 ProfitInDollars=begin nTotal = 0 thisPrice = NONUM 
 for i = 1 to PARAMCOUNT begin thisPrice = $[i].uprice if IsOption($[i]) then thisPrice = $[i].oprice if thisPrice != NONUM AND $[i].qty != NONUM AND $[i].price != NONUM then begin nTotal = nTotal + Profit($[i]) * $[i].dollars end end retval = Scale(nTotal, HUNDREDTHS) end  | 
| 
 
  | 
 
  | 
| 
 Comments  | 
 NA  | 
©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.