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, 09: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 NichUK, Today, 10:51 AM
0 responses
9 views
0 likes
Last Post NichUK
by NichUK
 
Started by caseymour127, Today, 09:46 AM
2 responses
20 views
0 likes
Last Post caseymour127  
Started by Apo84, Today, 09:37 AM
1 response
26 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by skblack1911, Today, 09:41 AM
1 response
4 views
0 likes
Last Post NinjaTrader_RyanS  
Started by bedaine, Today, 09:40 AM
3 responses
16 views
0 likes
Last Post NinjaTrader_RyanS  
Working...
X