Knowledgebase:
NewLimitOrder
Posted by Rula Halaseh, Last modified by Angham Al-Banawien on 07 July 2017 03:02 PM

Syntax

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

This function is used to take new limit order at specific price.A user account must be selected before using this method . After NewLimitOrder method executes the NewLimitOrderResult event fires.

Parameters

Part Description 
OrderType Operation Type ,value of type OperationTypeEnum
SymbolID Trading symbol number, value of type Integer.
Lots  Amount of lots ,value of type Double. 
AtPrice The price value that want to open limit order at it ,value of type Double.
SL Stop loss amount ,optional object
TP Take profit amount,optional object
Note Custom string used to mark the taken orders .
TransTag String value is used to mark the new limit order operation when the result came from the server.

Return value

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

Sample

 
 Public WithEvents BOAPI As CVertexFXBOAPI

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

  Dim result As VertexFXBOAPI10.CallingResultsEnum
 
Dim Sym As COSymbol = BOAPI.SymbolByID(6)'EUR/USD
  result = BOAPI.NewLimitOrder(VertexGeneral10.OperationTypeEnum.BuyType, Sym.ID, 1, Sym.Ask, "","","New Limit")
  MsgBox("New Limit Order Result : " & result.Tostring)
   

End Sub

 Private Sub m_oBOAPI_NewLimitOrderResult(ByRef Result As VertexFXBOAPI10.NewOrderResultEnum, ByRef OrderID As Integer, ByRef ServerTime As String) Handles m_oBOAPI.NewlimitOrderResult

        MsgBox(Result)

    End Sub
 


See Also


VertexFX Backoffice API 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