Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Bar: Adding bar not working

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

    Multi Bar: Adding bar not working

    Hello
    I have the following problem. I have two instruments, which I created myself. Let's call them:
    - InstrA
    - InstrB
    both are stocks.

    I created a strategy and it works when I let it run on InstrA or on InstrB. So far, so good.
    What I want to do now is to produce signals with data on InstrA and execute orders on InstrB. I added in the initialize routine this statement:
    Add("InstrB", PeriodType.Day, 1);
    When I do this, I see that the Initialize-Routine is executed, but the OnBarUpdate() is never called. There is also no error in the log.
    When I add the instrument with a exchange:
    Add("InstrB Globex", PeriodType.Day, 1);
    the result is the same.

    When I add one of the default stocks, such as AAPL, then OnBarUpdate() is called. There must be something in the definition of the instrument. But what? And why is it running on that instrument when I apply the strategy directly to it?

    Thanks for your help
    Andre

    #2
    Andre, which broker or feed are you using here? Is daily data supplied as needed for you custom symbols?

    Did you enter the exact custom symbol name as the string (capitals)?

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Andre, which broker or feed are you using here? Is daily data supplied as needed for you custom symbols?



      Did you enter the exact custom symbol name as the string (capitals)?
      I am doing only backtesting. Historical data is already loaded.
      data is available for 10 years. As said, If I apply the strategy directly on any of the two instruments all works perfectly. As soon I insert the "Add" command, it does not work anymore

      absolutely. I did over 10 trials. It works with AAPL, it does not work with my custom instrument.

      Comment


        #4
        Beauregard, any way I could test your snippet on my end here? Is this for 6.5 or 7 beta?

        You can contact me at support at ninjatrader dot com Attn Bertrand

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Beauregard, any way I could test your snippet on my end here? Is this for 6.5 or 7 beta?

          You can contact me at support at ninjatrader dot com Attn Bertrand
          this is 6.5. I sent you an email

          Comment


            #6
            Thanks, will check shortly.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            630 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            566 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X