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 cre8able, Today, 01:16 PM
    2 responses
    9 views
    0 likes
    Last Post cre8able  
    Started by chbruno, 04-24-2024, 04:10 PM
    3 responses
    48 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by samish18, Today, 01:01 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by WHICKED, Today, 12:56 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by WHICKED, Today, 12:45 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X