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?
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!
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
NinjaTrader
Keeping pending orders live
Collapse
X
-
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?Tags: None
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by foxtrott21, Today, 08:27 AM
|
0 responses
1 view
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
18 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:25 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:22 AM
|
0 responses
2 views
0 likes
|
Last Post
by jaypelle3
Today, 08:22 AM
|
Comment