in this case, i think it would be easier to just clear all historical orders as the first action in the code. What needs to be done in State.Historical or State.DataLoaded to perform a purge of all historical orders?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to clear all historical orders as the first action?
Collapse
X
-
How to clear all historical orders as the first action?
An error message that reads "...has been disabled because it attempted to modify a historical order that has transitioned to a live order..."
in this case, i think it would be easier to just clear all historical orders as the first action in the code. What needs to be done in State.Historical or State.DataLoaded to perform a purge of all historical orders?Tags: None
-
Hello Boonfly8
You can exit orders on the last historical bar.
if (State == State.Historical && CurrentBar == Count - 2)
Below is a link to an example (ProfitChaseStopTrailExitOrdersExample_NT8).
https://ninjatrader.com/support/foru...345#post521345Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
23 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
115 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
225 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
408 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|

Comment