Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

onExecution, which BarsInProgress (or Instrument)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    You can simply call the BarsInProgress property.

    For example the following:

    Code:
    		protected override void OnExecution(IExecution execution)
    		{
    			Print("execution occurred on BIP: " + BarsInProgress);	
    		}
    Would spit out the following:

    execution occurred on BIP: 2
    You can also do filtering on BIP like you may be using in OnBarUpdate:

    Code:
    if(BarsInProgress == 2)
    // do something
    Please let me know if that's not what you're looking for.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    71 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    43 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    25 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    28 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X