Results 1 to 2 of 2
  1. #1

    Default Remaining amount available to manage in open positions

    Dear Sir,

    is there an API to know amount of lots already managed for an open position (SL and TP) and the remaining amount available to manage ?

    if there is not a direct api to get this, what method do you propose to get this value ?

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

    Default

    Dear Ahmakki85

    Unfortunately there is no method that use to get the remaining amount but you can create your own method Check the following code may it will help you

    Code:
    public function GetRemainingLot (TicketID as Integer , TicketLot as Double) as Double 
      Dim lot as double  = 0 
      For i as Integer = 0 to BOAPI.OrdersCount -1 
         Dim vorder as COOrder 
         vorder = BOAPI.OrderByIndex(i)
         if vorder isNot nothing then
            if vorder.OrderTicket = TicketID then 
               lot = lot + vOrder.Lots        
            end if 
         end if 
      Next 
      if ticketlot > lot then
        return ticketlot - lot   
      else 
         return 0 
      end if 
    End function

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Symbol Amount
    By Tradetech in forum VertexFX API/VTL Forum
    Replies: 10
    Last Post: 10-17-2016, 02:45 PM
  2. Unable to get account summary and open positions from demo account
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 15
    Last Post: 07-11-2013, 05:07 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
  •