Knowledgebase: > Methods
Posted by Angham Al-Banawien, Last modified by Diana Alkouni on 25 August 2020 07:29 AM


Public Function UpdateClosedPosition(AccountID As Integer, TicketID As Integer, lot As Double, Price As Double, RefAskPrice As Double, Comm As Double, Interest As Double, Profit As Double, RefBidPrice As Double Optional UserDefinedDate As String = "") As CallingResultsEnum 


This function is used to updated closed ticket for specific account. After UpdateClosedPosition method executes the UpdatedClosedPositionResultReceived 
event fires.


Parameter Description 
AccountID Account number to edit closed position for, a value of type Integer.
TicketID Ticket number to be updated, the value of type Integer.
lot Updated amount of lot, the value of type Double.
Price New price value, value of type Double.
RefAskPrice  New ask price value for the reference symbol, value of type double.
Comm New Commotion value, the value of type Double.
Interest New Interest value, the value of type Double.
Profit New Profit/loss value, the value of type Double.
RefBidPrice  New bid price value for the reference symbol, value of type double.

Updated time, Date in format (“DD/MM/YYYY”)

“” , means now.

Return value

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


   Public WithEvents BOAPI as new CVertexFXBOAP

   Dim Result As CallingResultsEnum

   Result = BOAPI.GetAccountHistory(12345687,-1 , "", "")

   PrivateSub BOAPI_AccountHistoryReceived(ByRef AccountHistory As VBA.Collection) Handles BOAPI.AccountHistoryReceived

   Dim AccHis As CAccountHistory

   Dim ticket As Integer

   Dim Interest As Double

   Dim Comm As Double

   Dim RefPrice As Double

   Dim Price As Double

   For Each AccHis In AccountHistory

       If AccHis.HisType = "L" Then

           ticket = AccHis.ticket

           lot = 2

           Price = AccHis.ClosePrice

           RefPrice = AccHis.RefPrice

           Comm = AccHis.Comm

           Interest = AccHis.Interest

           Profit = 3

           Exit For

       End If


   Dim result As CallingResultsEnum

   result = BOAPI.UpdateClosedPosition(12345687, ticket, lot, Price, RefPrice, Comm, Interest, Profit,0, "")

   End Sub


See Also

VertexFX Backoffice API Index


Last Modified: 09 September 2017 

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