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