CQG API 4.0 - Revised
InitialMargin 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 : InitialMargin Method

Glossary Item Box

Description

Returns the account historical initial margin.

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

Syntax

Visual Basic
Public Function InitialMargin( _
   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

Initial margin value represented as Double.

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

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