Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keeping pending orders live

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

    Keeping pending orders live

    Hi,
    If I have pending orders on my chart, what if I want to keep them live even I wanted to shut down my computer for some reason. That mean, when I restart my pc will the pending order will remain active? if no, how can I keep that live until I cancel it or it get filled?

    #2
    Hello asmmbillah,

    Thanks for opening the thread.

    While we don't recommend shutting down NinjaTrader while in an open position, NinjaScript strategies can be designed to keep those orders running, and resume an active position if the strategy config allows.

    There are additional overloads for the order methods in the Managed Approach to follow "isLiveUntilCancelled" rules. These rules can be used to make sure the order stays live until it is cancelled.

    Additionally, it is advised to check your NinjaScript settings in the options menu as well as looking into your start behaviors so that the strategy will not cancel those orders when the strategy is disabled or when the strategy is enabled.

    Wait Until Flat will cancel live orders that were previously generated by the strategy. Immediately Submit will use the historical data processed by the strategy upon enablement to determine if there are any live orders previously generated by the strategy that can match orders created from the historical data. Immediately Submit will then try to resume those orders.

    It is important to understand the intricacies of the Start Behaviors as well as the NinjaScript settings in the Options menu. I'll include publicly available documentation for further reading.

    isLiveUntilCancelled orders - https://ninjatrader.com/support/help...ancelledOrders

    EnterLongLimit() (see isLiveUntilCancelled overload as an example) - https://ninjatrader.com/support/help...rlonglimit.htm

    Start Behaviors (Important read!) - https://ninjatrader.com/support/help..._positions.htm

    NinjaScript Strategy Options - https://ninjatrader.com/support/help...riptProperties

    I strongly recommend testing these settings using live data and a Sim account or with the Playback connection to get a better idea on how they are intended to function.

    Please let us know if you have any questions on the material.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    50 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X