Market Order Cycle
Posted by Hassan Abu Krayem, Last modified by Diana Alkouni on 02 September 2020 10:14 AM


The market order has a specific cycle in VertexFX Client API, that should be implemented in your API class as follows:

1- You have to call the NewMarketOrder function, which should return CallingResultsEnum result.

2- If SuccessResult has returned then you will receive:

Event NewOrderResult(ByRef Result As VertexFXClientAPI.NewOrderResultEnum, ByRef AtPrice As Double, ByRef PosOrOrder As Long, ByRef OrderID As Long, ByRef BuySell As VertexGeneral.OperationTypeEnum, ByRef Lots As Double, Symbol As VertexFXClientAPI.COSymbol, ByRef ServerTime As String, ByRef TransTag As String)

4- Else If PosOrOrder equal 2, this means that it is done as order and waiting for Backoffice reply (Auto-Broker is Off); in this case, you will receive either of MarketOrderRejected or MarketOrderAccepted when the Backoffice replied to your order. 
Then the cycle has finished.3- If PosOrOrder equal 1, this means that it is done as a position, 
in this case, the cycle has finished; Because it was accepted automatically by the Backoffice (Auto-Broker is On).

Note: NewOpenPosition event is fired in all online sessions that are selected the same account, If Multi-Sessions is allowed, to reflect the changes that are happening in open positions so it will be fired in all cases.


    See Also

    VertexFX Client API Index

    (2 vote(s))
    Not helpful

    Comments (0)
    Post a new comment
    Full Name:
    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