CQG API 4.0 - Revised
MaintenanceMargin Method
See Also  Send Feedback
day_

The desired day represented as Long:

day_ = 1 (Default): Means "yesterday close"

day_ > 1: Means "historical value for the specified day back": day_ = 2 (two days back) i.e. "the day-before-yesterday close" etc.

CQGAccountSummary Interface : MaintenanceMargin Method

Glossary Item Box

Description

Returns account historical maintenance margin.

Historical here means that the most recent maintenance margin that can be obtained is yesterday's close.

Syntax

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

Parameters

day_

The desired day represented as Long:

day_ = 1 (Default): Means "yesterday close"

day_ > 1: Means "historical value for the specified day back": day_ = 2 (two days back) i.e. "the day-before-yesterday close" etc.

Return Type

Maintenance margin value represented as Double.

If the requested day_ parameter is 1, yesterday close maintenance margin will be returned.

If the requested day_ parameter is higher than 1, the "close maintenance margin" 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.

Note: In this release only one day back (i.e., "yesterday close") value is available.

Example

See the usage of CQGAccountSummary methods in the AccountChanged event's example section.

See Also