Knowledgebase:
Market Order Cycle
Posted by Hassan Abu Krayem, Last modified by Mohammad Rahhal on 13 August 2013 10:14 AM


MarketOrderCycle

The market order has 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.NewOrderResultEnumByRef AtPrice As DoubleByRef PosOrOrder As LongByRef OrderID As LongByRef BuySell As VertexGeneral.OperationTypeEnumByRef Lots As Double, Symbol As VertexFXClientAPI.COSymbolByRef ServerTime As String, ByRef TransTag As String)

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).

4- Else If PosOrOrder equal 2, this means that it is done as an order and waiting for Backoffice reply (Auto-Broker is Off); in this case you will received either of MarketOrderRejected or MarketOrderAccepted  when the Backoffice replied to your order. Then the cycle has finished.

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



See Also

VertexFX Client API Index

(2 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