Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
onExecution, which BarsInProgress (or Instrument)
Collapse
X
-
onExecution, which BarsInProgress (or Instrument)
I am throwing out several buys for multiple instruments out at once. I need to determine how to process the fills for each. Using onExecution, how would I filter which instrument is being reported for this execution? IE:, which BarsInProgress is happening for the fill that just came in?Tags: None
-
You can simply call the BarsInProgress property.
For example the following:
Would spit out the following:Code:protected override void OnExecution(IExecution execution) { Print("execution occurred on BIP: " + BarsInProgress); }
You can also do filtering on BIP like you may be using in OnBarUpdate:execution occurred on BIP: 2
Please let me know if that's not what you're looking for.Code:if(BarsInProgress == 2) // do something
MatthewNinjaTrader Product Management
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
24 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
30 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
18 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
27 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment