Returns the account Unrealized Profit/Loss value.
Visual Basic |
---|
Public Function UPL( _ Optional ByVal day_ As Long = 0 _ ) As Double |
- day_
The desired day represented as Long:
day_ = 0 (Default): Means "today/current"
day_ > 0: Means "historical value for the specified day back": day_ = 1 (one day back) i.e. "yesterday close", 2 (two days back) i.e. "the day-before-yesterday close" etc.
UPL value represented as Double.
If the requested day parameter is 0, the returned value will be based on the current positions.
If the requested day parameter is higher than 0, the "close UPL" of the requested day will be returned.
If no data is available for the requested day an invalid value will be returned.
If the account summary was requested through CQGCEL.QuerySummariesStatement, (which has its Date_ parameter specified) day_ will be ignored.
Note: In this release, in addition to the current value, only one day back (i.e., "yesterday close") is available.