Syntax
Public Function PositionGetDouble (ByVal property_id As ENUM_POSITION_PROPERTY_DOUBLE) As Double.
Description
This function overloads 2 variants like the following
Syntax
Public Function PositionGetDouble (ByVal property_id As ENUM_POSITION_PROPERTY_DOUBLE, ByRef double_var As Double) As Boolean.
Description
This function is used to return the value of type double that corresponding at position property for positionSelectByIndex.
Parameters
Parameter |
Description |
property_id |
The property which is required to get its value. It can be one of the ENUM_POSITION_PROPERTY_DOUBLE. |
double_var |
The requested property value. Value of type Double. |
Return value
Returns the requested property value as the value of type Double.
Sample
Public Sub main()
Dim Select_Result As Boolean
Dim value as Double
Select_Result = ClientCode.PositionSelectByIndex (1)’ select the first open position at trade list
If Select_Result = true then
value = ClientCode.PositionGetDouble(VTLGeneral.ENUM_POSITION_PROPERTY_DOUBLE.POSITION_PRICE_OPEN)
GUI.MsgDialog(“Position Open Price value is:” & value )
' Or you can use the below code
Dim Result As Boolean
Result = ClientCode.PositionGetDouble(VTLGeneral.ENUM_POSITION_PROPERTY_DOUBLE.POSITION_PRICE_OPEN,value)
If result = true then
GUI.MsgDialog(“Position Open Price value is:” & value )
End IF
End If
End Sub
See Also
Back to VTL Server Script Index
|