public method TradingSettingsProviderAut.GetMargins

Brief

Returns maintenance margin requirement, entry margin requirement and liquidation margin requirement.

Declaration
Visual Basic
Function GetMargins (sInstrument as String, sAccountID as String, ByRef pvMMR as Variant, ByRef pvEMR as Variant, ByRef pvLMR as Variant) As Boolean
IDL
[id(20)] HRESULT GetMargins( [in] BSTR sInstrument, [in] BSTR sAccountID, [out]VARIANT *pvMMR, [out]VARIANT *pvEMR, [out]VARIANT *pvLMR, [out, retval] VARIANT_BOOL* retVal)

Parameters
sInstrument

The name of the instrument to get the trading setting for.

sAccountID

The identifier of the account to get the trading setting for.

pvMMR

[output] Returns maintenance margin requirement which defines the amount of funds required to maintain a one lot position.

The value makes sence only if the margin policy is three-level. Note that for three-level margin policy the method returns true.

pvEMR

[output] Returns entry margin requirement which defines the amount of funds required to open a one lot position.

The value makes sence only if the margin policy is three-level. Note that for three-level margin policy the method returns true.

pvLMR

[output] Returns liquidation margin requirement which defines the amount of funds required to prevent the liquidation of a one lot position.

The value makes sence for both three-level and one-level margin policy.

Returns

The method returns true if the margin policy is three-level. In this you can retrieve MMR/EMR/LMR values from the output parameters of the method.

Otherwise the method returns false. In this case you should use the LMR output value.

Details

When calling the method for a not subscribed symbol, Order2Go throws an error saying that the symbol is not subscribed. To subscribe for a symbol, use the method TradeDeskAut.SetOfferSubscription.

The GetMargins method is defined in the TradingSettingsProviderAut class.

back