Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Handling ChangeOrder method

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

  • YuriyGulyayev
    replied
    Actually the code in my previous post appears to be incorrect.
    What bltdavid posted appears to work better.

    My questions is: will this work if applied to OCO orders amid concurrently occurring partial fills?
    I set the "Enforce Partial Fills" setting and I have observed that only after the 1st partial fill the quantity of the order on the other side of the market gets reduced, but not after further partial fills.

    Leave a comment:


  • YuriyGulyayev
    replied
    This would be more correct, I think:
    ChangeOrder(order, order.Quantity - order.Filled, LimitPrice, StopPrice);
    But the problem is that it's possible that order.Filled doesn't yet reflect all recent fills.
    Last edited by YuriyGulyayev; 07-10-2017, 10:47 AM.

    Leave a comment:


  • bltdavid
    replied
    Here ya go,

    Code:
            protected void ChangeOrder(IOrder order, double LimitPrice, double StopPrice)
            {
                ChangeOrder(order, order.Quantity, LimitPrice, StopPrice);
            }

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello guillembm,

    I've received a tracking ID for your request. For future reference, your request to add an overload for ChangeOrder() that does not have the quantity parameter is being tracked with ID #SFT-1914.

    Please keep in mind it is up to the NinjaTrader Development to decide if and when a feature request will be implemented.

    Thanks for your feedback. Please let me know of any other suggestions or ideas you have for the NinjaTrader platform.

    Leave a comment:


  • guillembm
    replied
    This would be a great idea. Thanks for your support

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello guillembm,

    There is not an overload that would allow for ChangeOrder to be called without a quantity.

    Would you like to submit a feature request for the NinjaTrader development to consider adding functionality to change an order without specifying the quantity in a future version of NinjaTrader?

    Leave a comment:


  • guillembm
    replied
    Would it be possible to use the ChangeOrder method with a setting that only modifies the price of the order, leaving the Quantity parameter blank?

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello guillembm,

    When calling ChangeOrder() this will also change the quantity. The quantity must be set to the quantity you want the order to have after the change order takes effect.

    If there is a part fill and you want to modify the price, you would set the price to the remaining unfilled amount.
    (i.e. the original quantity is 10, a quantity of 2 part fills, the change order should be set to the remaining 8).

    Leave a comment:


  • guillembm
    started a topic Handling ChangeOrder method

    Handling ChangeOrder method

    Hello,

    Let's say that I set and unmanaged limit order and I want to change the price but not the quantity of the order. But, between a change of the price the order has been partially filled,

    When I use changeorder() with the new Price parameter, the Quantity parameter has to be updated to the number or remaining shares to be filled or the original value of the order has to be kept even if the order has been partially filled?

    Thanks

Latest Posts

Collapse

Topics Statistics Last Post
Started by wzgy0920, 04-20-2024, 06:09 PM
2 responses
27 views
0 likes
Last Post wzgy0920  
Started by wzgy0920, 02-22-2024, 01:11 AM
5 responses
32 views
0 likes
Last Post wzgy0920  
Started by wzgy0920, 04-23-2024, 09:53 PM
2 responses
49 views
0 likes
Last Post wzgy0920  
Started by Kensonprib, 04-28-2021, 10:11 AM
5 responses
193 views
0 likes
Last Post Hasadafa  
Started by GussJ, 03-04-2020, 03:11 PM
11 responses
3,235 views
0 likes
Last Post xiinteractive  
Working...
X