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

Close PartFilled order

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

    Close PartFilled order

    What happens if I have a long position in a PartFilled state and then I call the ExitLong method.Will it completely flat my entire position and make sure the part which was not filled won't be filled in the future?

    Thanks

    #2
    Hello kiss987,

    Thank you for writing in. Please refrain from posting the same question in multiple threads. If you call ExitLong() and ExitShort() without a quantity or entry signal, it will render your entire position flat. Once your position is flat, open orders will be cancelled automatically.

    By default, unfilled orders will expire at the end of the bar unless live until cancelled is set to true. So if your strategy had a partially filled live until cancelled order and the rest of the order had not been cancelled for another reason, it would still exist to be potentially filled in the future until you call the CancelOrder() method or its Time in force is reached or until ExitLong() or ExitShort() had flattened your position.

    In this scenario it would be better practice to call CancelOrder() first to prevent the rest of the order from filling as you are flattening the position using ExitLong().

    For an example using the CancelOrder() strategy, please see here: http://ninjatrader.com/support/forum...ad.php?t=18890
    The CancelOrder() method is also in our help guide: http://ninjatrader.com/support/helpG...ancelorder.htm

    Please let me know if you have any questions.
    Michael M.NinjaTrader Quality Assurance

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
    80 responses
    19,666 views
    5 likes
    Last Post NinjaTrader_ChelseaB  
    Started by adeelshahzad, Today, 03:54 AM
    2 responses
    15 views
    0 likes
    Last Post adeelshahzad  
    Started by dappa, Today, 09:18 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by bill2023, Yesterday, 08:51 AM
    5 responses
    24 views
    0 likes
    Last Post bltdavid  
    Started by frankthearm, Today, 09:08 AM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X