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
Description
This function used to make new pending order at specific given price, After NewLimitOrder method executes the NewLimitOrderResultevent fires.
To get
Parameters
Parameter | Description |
OrderType | Open operation type, value of typeOperationTypeEnum |
Lots | Amount of |
AtPrice | Requested limit price, value of type double. |
SymbolID | Requested limit price, |
SL | Stop Loss, optional value of type Double. |
TP | Take Profit, optional value of type Double. |
Note | To add |
Return value
Returns value of typeCallingResultsEnum. If the request sent to
Sample
Public Sub Main () Dim Result As VTLGeneral.callingResultsEnum Dim Sym As VTLGeneral.CSymbol Dim Price as Double = 20 Dim point1 as double= 0 Dim piploc as Integer Sym = ClientCode.GetSymbolByID (6) piploc=Clientcode.symbolInfoInteger(Sym.name,VTLGeneral.ENUM_SYMBOL_INFO_INTEGER.SYMBOL_PIP_LOCATION) point1 = 10^ piploc Result = ClientCode.NewlimitOrder (1, sym.ID, 1, Sym.Ask+price * point1, , ,"") GUI.msgDialog (Result) End Sub
See Also