Results 1 to 3 of 3
  1. #1

    Default Invalid Order ID

    Hi,

    Can you please check attached its giving Invalid Order ID error. Hope you could suggest some solution for the same.

    Thanks,
    Attached Files Attached Files

  2. #2

    Default

    In Buy Order While Updating SL its give INVALID ORDER ID error.

  3. #3

    Default

    Dear BGT

    It seems you send the Position ID instead of SLTP Order ID to UpadteSLTPOrder. and to get the position's SLTP orders you can use RequestManageOrders function.

    check the following sample

    Code:
    Public Sub main()
        Dim PositionTicket
        PositionTicket=PositionGetTicket(1)
        If RequestManageOrders (PositionTicket) Then
            AlertMessage "The Request has been sent to the server to get all manage orders related to PositionTicket "
        Else
            Alertmessage  ErrorDescription(GetLastError())
        End If 
    End Sub
    
    
    
    
    'This event raised when calling RequestManageOrders method successfully 
    Public Sub OnManageOrdersReceived(manageOrders)
        Dim i
        'Receiving Manage Order related to PositionTicket 
        if manageOrders.Count=0 then 
            NewSLTPOrder(Clng(manageOrders.Ticket), 0.1,1.12345 , 0.98765 )
        else
            For i = 1 To manageOrders.Count() ' each position may has more than 1 SLTP order (partial manage)
                UPDATESLTPORDER clng(manageOrders.orders(i)), 0.1 , 1.2345 , 0.98678
            Next
        end if 
    
    
      End Sub
    Last edited by Ghawanmeh-HS; 10-07-2019 at 08:41 AM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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