if i stop and start a strategy. how do i detect it from my code so that i can reinitialize all my strategy values on restart.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to find our barid against which i enetered order.
Collapse
X
-
how to find our barid against which i enetered order.
how do i find the barid against which i placed order. i want to cancel it if the orderis not filled after 2 bars.
if i stop and start a strategy. how do i detect it from my code so that i can reinitialize all my strategy values on restart.Last edited by junkone; 05-26-2009, 05:40 AM.Tags: None
-
You would need to store the barnumber with CurrentBar you placed the order on - http://www.ninjatrader-support.com/H...urrentBar.html
Then CancelOrder it if CurrentBar is higher than your variable + x
(sample script for this is also found on this helpguide page)
Unfortunately there's no method to detect if the strategy is started / stopped.
-
Right. If you cancel an exit order for an entry you will not be able to resubmit that same exit order for that same entry. We have already provided you workarounds for that. Unfortunately there is no ETA I can provide you at this time for when the fix will be available. This is a very sensitive area that has many implications everywhere and every precaution needs to be taken in creating this fix. Thank you for understanding.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
68 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
150 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
100 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
288 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment