CQG API 4.0 - Revised
ProfitLoss Method
See Also  Send Feedback
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.

CQGAccountSummary Interface : ProfitLoss Method

Glossary Item Box

Description

Returns the account's profit/loss value.

Syntax

Visual Basic
Public Function ProfitLoss( _
   Optional ByVal day_ As Long = 1 _
) As Double

Parameters

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.

Return Type

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.

Remarks

If the account summary was requested through CQGCEL.QuerySummariesStatement, (which has its Date_ parameter specified) day_ will be ignored.

See Also