Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to modify limit price of an Order and handle Partail Fills

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

    How to modify limit price of an Order and handle Partail Fills

    Hi,

    If I submitted an order using EnterLongLimit() with limit price and meanwhile the market has moved higher and I wan to change the limit price to a higher number. How do I do that. Is there a ModifyOrder function available ? or do I have to first cancel that order and then re-enter a new one with new price ?

    Another question is on Partail Fill.
    If my order quantity was 5 and I only got a fill for 3. How do I cancel the 2 unfilled contracts which were not filled and I do not want to wait for them to fill ? Will the Profit Target and Stop Loss still work for the 3 contracts that were actually got filled ?

    Thanks,

    -Ash

    #2
    Hello Ash101,

    With the managed approach you can just call the EnterLongLimit again with the same signal name to update the existing order. This would be similar to creating a trailing stop. If you moved to the unmanaged approach in that case there is a specific ChangeOrder method that would be used.

    To cancel orders, we have a sample that covers that topic here: https://ninjatrader.com/support/help...thod_to_ca.htm

    The stop and target will submit for the partial fill and how that is handled will relate to your Stop & target submission property (see How to close a position)
    https://ninjatrader.com/support/help...htsub=perentry To avoid any of the partial fill situations you can instead use the concept from the scaling example and submit multiple entry orders which equate to the position. each entry would have its own set of targets and would not have the potential to partial fill.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply. Will take a look at those links and post back if I have any further doubts...

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PhillT, Today, 02:16 PM
      2 responses
      3 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by Kaledus, Today, 01:29 PM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      14 responses
      47 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by gentlebenthebear, Today, 01:30 AM
      2 responses
      13 views
      0 likes
      Last Post gentlebenthebear  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      17 views
      0 likes
      Last Post PaulMohn  
      Working...
      X