Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unmanaged: changing order quantity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unmanaged: changing order quantity

    Hi Ninjas,

    There's a position with its StopLoss order that the Script must close. If the order is filled partially, the tied Stop Loss should update the quantity of the remaining position. Checking log and trace files, I see this is updated immediately, so :

    1. If I want to update the remaining Stop order quantity, it is as simple as setting in Position.Quantity when a partially filled occurs, isn't it....or, Would I have to set a variable for the previous Position.Quantity and substrat the PartFilled quantity of the Exit order??
    Last edited by pstrusi; 12-22-2013, 08:03 AM.

    #2
    Position.Quantity would give you the current position and you can set the remaining stop to that position. There is no inherent reason you should need to track the previous position, unless you'd like to for additional logic checking.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks Matthew. That's what came from previous testing but I'd like to be sure that there won't be any run time errors about this.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AHamxa, Yesterday, 11:24 PM
      0 responses
      5 views
      0 likes
      Last Post AHamxa
      by AHamxa
       
      Started by AHamxa, Yesterday, 11:22 PM
      0 responses
      4 views
      0 likes
      Last Post AHamxa
      by AHamxa
       
      Started by AHamxa, Yesterday, 11:17 PM
      0 responses
      5 views
      0 likes
      Last Post AHamxa
      by AHamxa
       
      Started by Spiderbird, 07-27-2018, 07:52 PM
      12 responses
      9,240 views
      2 likes
      Last Post Mountain_cast  
      Started by chrischongpdx, Yesterday, 09:39 PM
      0 responses
      7 views
      0 likes
      Last Post chrischongpdx  
      Working...
      X