Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-instrument issue

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

    Multi-instrument issue

    Hello,

    I have a strategy with two instruments:

    BarsInProgress 0---> 1 tick
    BarsInProgress 1--> Daily

    Why I never enter into "if(BarsInProgress==1)" (please see below) if I run the strategy from Strategy TAB but
    I enter successfully into "if(BarsInProgress==1)" if I run the strategy using Strategy Analyzer?

    Thank You
    GB

    protectedoverridevoid Initialize()
    {
    Add(PeriodType.Day,1);
    }


    protectedoverridevoid OnBarUpdate()
    {
    if(BarsInProgress==1){
    Print(" BarsInProgress==1 ")
    return;
    }
    }


    #2
    I suspect it is due to the use of the "return;" in your code block.
    whitmark
    NinjaTrader Ecosystem Vendor - Whitmark Development

    Comment


      #3
      Hello gbulle,
      Thanks for writing in and I am happy to assist you.
      1. To assist you further may I know how may days of data you are loading in the chart?
      2. Is CalculateOnBarClose set to true or false?
      3. Who your data provider is?


      I look forward to assisting you further.
      JoydeepNinjaTrader Customer Service

      Comment


        #4
        Thank you for the answers; it is just one hour
        I am playing around this issue.

        1- deleting return does not change the behaviour
        2- I loaded 3 days; then I changed to 40 and 60 (no differences)
        3-calculate on bar close is TRUE; if I change to FALSE the behaviour is the same
        4 I am using IB

        in my opinion the "DAILY" bars load does not work.. I do not know why....

        Regards
        GB

        Comment


          #5
          Hello gbulle,
          Thanks for the information.

          Please send me your log and trace files for today so that I may look into what occurred.

          You can do this by going to the Control Center-> Help-> Mail to Support.

          Please append Attn:Joydeep in the subject line of the email and add a reference of this thread in the body of the email.

          I look forward to assisting you further.
          JoydeepNinjaTrader Customer Service

          Comment


            #6
            Hello,

            anr update:

            if BarsInProgress==0 is DAILY bars and BarsInProgress==1 is 1 tick bar everything is fine.

            if BarsInProgress==1 is DAILY bars and BarsInProgress==0 is 1 tick bar

            unable to process BarsInPorgress==1 if working from Strategy Tab!!!


            Regards
            GB

            Comment


              #7
              Hello gbulle,
              I have received your email and I will be following up by email.
              JoydeepNinjaTrader Customer Service

              Comment


                #8
                pray tell, what was the resolution to this issue?
                whitmark
                NinjaTrader Ecosystem Vendor - Whitmark Development

                Comment


                  #9
                  whitmark,

                  Unfortunately, Joydeep is out of the office currently. I will have him respond to you when he gets back.

                  Hope your holiday went well!
                  Adam P.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello,

                    I believe this one had to do with using a days to load setting of days instead of using bars to load. You must use days in MTF due to some issues with bars to load with MTF that causes some unexpected results and is something we are already looking into for next major release.

                    -Brett
                    BrettNinjaTrader Product Management

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    639 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    366 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    107 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    569 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    572 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X