Results 1 to 2 of 2
  1. #1

    Default Best way to update open trades

    Hello Sir,

    i'm using the GetOpenPositions operation to get all the currently opened positions in the trade, the problem i'm facing is when i have an account that has a lot of opened positions (over 100 trades)
    there is a delay in getting the list back from this function
    so my question is:
    what is the best way to update the current price and profit/loss for each opened trade for every price change ?

    Thank you.

  2. #2
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    341

    Default

    Quote Originally Posted by ahmakki85 View Post
    Hello Sir,

    i'm using the GetOpenPositions operation to get all the currently opened positions in the trade, the problem i'm facing is when i have an account that has a lot of opened positions (over 100 trades)
    there is a delay in getting the list back from this function
    so my question is:
    what is the best way to update the current price and profit/loss for each opened trade for every price change ?

    Thank you.


    I suggest the following to update the current price and profit /loss :
    1- Calculate the profit / loss locally by using the PL formula.
    2- Update the PL and the prices for the visible trade on the trade list
    3- to full PL value on account summary you can build a net trade list then update the current price and PL for each symbol (Buy and sell ) one time in each symbol tick

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (1 members and 1 guests)

  1. Carolynloova

Similar Threads

  1. Backoffice API Issues in Deleting closed trades
    By Edakad in forum VertexFX API/VTL Forum
    Replies: 8
    Last Post: 02-25-2019, 05:15 AM
  2. Get Net Positions and Trades of all accounts
    By Mihir in forum VertexFX API/VTL Forum
    Replies: 1
    Last Post: 05-21-2018, 09:36 AM
  3. Update an Open Position
    By SpotOption in forum VertexFX API/VTL Forum
    Replies: 4
    Last Post: 06-01-2016, 04:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •