Public Function SlTpPrice (ByVal TransType As OperationTypeEnum, ByVal SymbolID As Integer, ByVal FromPrice As Double, ByVal SlorTP As String) As String.
This function is used to get the Stop Loss or Take Profit price according to transaction type.
Operation type which can be one of OperationTypeEnum.
Symbol number which is required to get the Stop Loss or Take Profit price for. Value of type is Integer.
||From which price the Stop Loss /Take Profit will be taken, Value of type is Double.
||Stop loss”SL”/ Take Profit “TP”. Value of type is String.
Returns Stop Loss or Take Profit price as the value of type Double.
Public Sub main()
Dim Order_ as VTLGeneral.Order
Order_= ClientCode.OrderByIndex (1)
Dim SlTp_Price as Double
SlTp_Price = ClientCode.SlTpPrice(VTLGeneral.OperationTypeEnum.BuyType,6,Order_.limitPrice,"SL")
GUI.MsgDialog (“Stop loss price ” & SlTp_Price)
Back to VTL Server Script Index