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

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.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Tim-c, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post Tim-c
    by Tim-c
     
    Started by FrancisMorro, Today, 03:24 AM
    0 responses
    2 views
    0 likes
    Last Post FrancisMorro  
    Started by Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,771 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    31 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    945 views
    0 likes
    Last Post spwizard  
    Working...
    X