Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Daily Data 6E

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

    Daily Data 6E

    Hi,
    I'm using 2 time frames :

    Add(PeriodType.Day,1);
    Add(PeriodType.Minute,10);

    in the OnBarUpdate i wrote :

    if (BarsInProgress != 0)
    return;

    I'm using 2 indicator :
    one with time frame of daily :

    ATR(BarsArray[1],2);

    second with time frame of minutes :

    DonchainChannel(BarsArray[2],20)

    My problem is, when i'm runing a backtest from the dates
    8/1/2012 till 11/1/2012
    I'm getting trades or just printing the values of the indicator from the 8/31/2012.
    what happend to the begining of the month????

    tnx,
    Igal

    #2
    Igal, which BarsRequired setting are you using here? 20 bars / days?

    Thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      U mean :
      if (CurrentBar < 20)
      return;

      ?

      Igal

      Comment


        #4
        No, the BarsRequired setting you have directly in the UI - that's normally 20, so 20 bars would be skipped until OnBarUpdate() called then, that's likely what you see here.

        BertrandNinjaTrader Customer Service

        Comment


          #5
          ok its the same thing that i wrote.
          in the UI its 20

          Comment


            #6
            Ok, then I would expect that outcome. You can change to a lower value as well, if you script would not need that many bars for inits.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              those bars are by minute or daily??
              i mean if the Min. bars required is 3 so i wait till 3 days of data or 30 minute?

              Comment


                #8
                All your series would need to have it fullfilled before you see an OnBarUpdate() call. So if you have it at 3 > it would be 3 days in your setup.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Ok,
                  tnx

                  Igal

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by ageeholdings, Today, 07:43 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post ageeholdings  
                  Started by pibrew, Today, 06:37 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post pibrew
                  by pibrew
                   
                  Started by rbeckmann05, Yesterday, 06:48 PM
                  1 response
                  14 views
                  0 likes
                  Last Post bltdavid  
                  Started by llanqui, Today, 03:53 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post llanqui
                  by llanqui
                   
                  Started by burtoninlondon, Today, 12:38 AM
                  0 responses
                  12 views
                  0 likes
                  Last Post burtoninlondon  
                  Working...
                  X