Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Instrument Strategy question

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

    Multi-Instrument Strategy question

    Hi,

    Let's say for example I have a 1-minute chart of MSFT. On the Initialize() method I have added a 1-minute for APPL. CalculateBarOnClose is set to false, so it will be processing every tick.

    protected override void Initialize()
    {
    Add("AAPL", PeriodType.Minute, 1);
    }

    protected override void OnBarUpdate()
    {
    // Do something

    }


    Question:

    If two ticks are received exactly at the same time, one for MSFT and one for AAPL,
    - Does Ninjatrader strategy process both ticks?; or
    - Is one of the ticks discarded because the strategy is busy processing the other tick?
    - Does Ninjatrader strategy handle different ticks on different threads?

    Thank you.

    #2
    Hello Futures,

    Thank you for your post.

    NinjaScript is event driven which means it will process each tick for OnBarUpdate at the time they were received, this will come down to milliseconds upon arrival. One will process before the other. It is unlikely that you will ever receive two ticks at the exact same time.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    67 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    59 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X