Returns the account's profit/loss value.
Visual Basic |
---|
Public Function ProfitLoss( _ Optional ByVal day_ As Long = 1 _ ) As Double |
- day_
The desired day represented as Long:
day_ = 0 (Default): Returns the 'current' value, which depends on current positions and quotes.
day_ > 0: Returns the historical profit/loss value, where 1 means "yesterday close" value, etc.
Profit and loss value, represented as Double.
If the requested day parameter is 0, the current profit and loss value will be returned.
If the requested day parameter is larger than 0, the close profit and loss 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.