NewLimitOrder
Posted by Mohammad Rahhal, Last modified by Angham Al-Banawien on 12 October 2016 09:40 AM

Syntax

Public Function NewLimitOrder(ByVal OrderType As OperationTypeEnum, ByVal SymbolId As Integer, ByVal Lots As Double, ByVal AtPrice As Double, Optional ByVal SL As Object = "", Optional ByVal TP As Object = "",Optional ByVal Note As String = "") As CallingResultsEnum

TThis function used to make new pending order at specific given price, After NewLimitOrder method executes the NewLimitOrderResult event fires.
To get result from the server after accepted the order you have to consume OnOrderTrade event.

Parameters

Parameter  Description 
OrderType Open operation type, value of type OperationTypeEnum
Lots Amount of lots , value of type Double.
AtPrice Requested limit price, value of type double.
SymbolID  Requested limit price, value of type double.
SL Stop Loss, optional value of type Double.
TP Take Profit, optional value of type Double.
Note  To add note to comments field on trade tap at the client terminal.

Return value

Returns value of type CallingResultsEnum. If the request sent to server successfully it will return SuccessResult.

Sample

     Public Sub Main () 

       Dim Result As VTLGeneral.callingResultsEnum

       Dim Sym As VTLGeneral.CSymbol    

       Dim Price as Double = 20                           

       Dim point_ as double= 0

       Dim piploc as Integer  

      Sym = ClientCode.GetSymbolByID (6)         

      piploc=Clientcode.symbolInfoInteger(Sym.name,VTLGeneral.ENUM_SYMBOL_INFO_INTEGER.SYMBOL_PIP_LOCATIN)

      point1 = 10^ piploc

      Result = ClientCode.NewlimitOrder (1, sym.ID, 1, Sym.Ask+price * point1, , ,"")

      GUI.msgDialog (Result)

 

     End Sub


See Also


Back to VTL Server Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions