Syntax
Public Function PositionGetBool(ByVal property_id As ENUM_POSITION_PROPERTY_BOOL) As Boolean.
Description
This function overloads 2 variants as the following
Syntax
Public Function PositionGetBool(ByVal property_id As ENUM_POSITION_PROPERTY_BOOL, ByRef bool_var As Boolean) As Boolean.
Description
This function is used to return value of type Boolean that corresponding at position property for theselected position
Parameters
Parameter | Description |
property_id | The property which is required toget its value. It can be one of the ENUM_POSITION_PROPERTY_BOOL |
String_var | The requested property value. Value of type is Long. |
Return value
Returns the requested property value as the value of type String.
Sample
Public Sub main() Dim Select_Result As Boolean Dim value as Boolean Select_Result = ClientCode.PositionSelectByIndex (1) select the first open position at trade list If Select_Result = true then value = ClientCode.PositionGetBool (VTLGeneral.ENUM_POSITION_PROPERTY_BOOL.POSITION_LIQUIDATE) GUI.MsgDialog(Position liquidate?: & value ) ' Or you can use the below code Dim Result As Boolean Result = ClientCode.PositionGetBool (VTLGeneral.ENUM_POSITION_PROPERTY_BOOL.POSITION_LIQUIDATE,value) If result = true then GUI.MsgDialog(Position liquidate?: & value ) End IF End If End Sub
See Also