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 Belfortbucks, Today, 09:29 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Belfortbucks  
                    Started by zstheorist, Today, 07:52 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post zstheorist  
                    Started by pmachiraju, 11-01-2023, 04:46 AM
                    8 responses
                    151 views
                    0 likes
                    Last Post rehmans
                    by rehmans
                     
                    Started by mattbsea, Today, 05:44 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post mattbsea  
                    Started by RideMe, 04-07-2024, 04:54 PM
                    6 responses
                    33 views
                    0 likes
                    Last Post RideMe
                    by RideMe
                     
                    Working...
                    X