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

Add day in multiple time frame

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

    Add day in multiple time frame

    Hi NT experts,

    I am testing bars in progress with multiple time frames of same instrument.
    CalculateOnBarClose =
    false.

    So it should not wait till bar close to recongnize the bars in progress of different time frames.

    I have no problem in adding ticks, seconds and different minutes. The print-out constantly updates the different BarsInProgress (0,1,2,3...) once a new tick is painted.

    However, When i add PeriodType.Day, the BarsInProgress nevers recongnize it. Any ideas or suggestions.

    Regards,

    #2
    binwang2, which datafeed / connection are you testing this with? Is it supporting daily data? http://www.ninjatrader-support.com/H...ricalData.html

    As a workaround a 1440 min bars object would do it...
    BertrandNinjaTrader Customer Service

    Comment


      #3
      It is Interactive Brokers. The data is FOREX.

      Comment


        #4
        binwang2,

        By default you need at least 20 bars on ALL BarsInProgress before any BarsInProgress will trigger. That means you need a minimum of 20 days before anything will start.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks for the note.

          My default setup under options tab for daily is 365 daily bars. So I assume when i do Add(PeriodType.Day,1), there should be enough daily bars for daily BrasInProgrss to be triggered. Or do i need explictly to specify (if CurrentBras >=20)?

          By the way, the primary data series is at tick level. Not sure that will make any difference.

          Comment


            #6
            Those options are irrelevant. The default number of bars required before a strategy starts is defined in the strategy selection dialogue as "Min. bars required". Default is 20.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks. I can get min required bars when I start a chart first and then load strategy directly to the chart.

              However, when starting a strategy directly from strategy tab under Control Center, if strategy does not automatically load min bars for primary data series, then I don't know how to meet the min bar requirement. Letting a strategy running at least min bars' length is intuitively combersome.

              Any suggestions are welcome.

              Regards,
              Last edited by binwang2; 09-18-2009, 12:12 PM.

              Comment


                #8
                Not sure I follow. When you load a strategy from the Control Center you also have the min bars property you can change.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Sorry for the confusion.

                  Put it in another way. When starting from control center, will a strategy automatically load the min. bars for primary data series?

                  What i am thinking is: Putting a number like 20 in strategy dialogue for min. bar required is one thing. Whether the stategy makes min. bars available for computation is another.

                  Comment


                    #10
                    When you run a strategy from the Control Center it loads the amount of data specified in the default lookback for the time interval you chose in the Tools->Options menu.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by judysamnt7, 03-13-2023, 09:11 AM
                    4 responses
                    59 views
                    0 likes
                    Last Post DynamicTest  
                    Started by ScottWalsh, Today, 06:52 PM
                    4 responses
                    36 views
                    0 likes
                    Last Post ScottWalsh  
                    Started by olisav57, Today, 07:39 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post olisav57  
                    Started by trilliantrader, Today, 03:01 PM
                    2 responses
                    21 views
                    0 likes
                    Last Post helpwanted  
                    Started by cre8able, Today, 07:24 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post cre8able  
                    Working...
                    X