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 DannyP96, 05-18-2026, 02:38 PM
|
1 response
29 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
117 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
69 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
227 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
309 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment