• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get data from another timeframe without adding new DataSerie

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

    Get data from another timeframe without adding new DataSerie

    Hello.

    Tell, me please, is there any way to get data from anоther timeframe without adding this timeframe?

    For example, I want put my indicator on 1 min chart, but for calculations I need daly data over 4 years.

    Thanks.
    Last edited by fx.practic; 02-24-2013, 03:33 AM.
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Originally posted by fx.practic View Post
    Hello.

    Tell, me please, is there any way to get data from anither timeframe without adding this timeframe?

    For example, I want put my indicator on 1 min chart, but for calculations I need daly data over 4 years.

    Thanks.
    Data must come from somewhere. If you want data from the daily chart, then you need to add the necessary data stream, so the answer to your question is "no".

    Edit: For the special case of daily bars, however, you can use the GetDayBar() method or the PriorDayOHLC() class.
    Last edited by koganam; 02-24-2013, 04:18 AM.

    Comment


      #3
      Hello.

      Tell, me please, is there any way to get data from another time frame without adding this time frame?

      For example, I want put my indicator on 1 min chart, but for calculations I need daily data over 4 years.

      Thanks.
      Actually in this case you can compute the daily data from your 1 minute data. Each day equals 1440 minutes.
      Just remember that you still need to load this data to a chart and bars request should be 4 (years) * 365(days) * 1440 (min)
      Or a better way is to calculate this number in advance and just use it.
      What ever the calculation is on so much data it won't change in one or even 10 days.

      Comment


        #4
        Thank you, koganam and Baruch!

        Now I exactly know what to do.

        I will make strategy, that write daly prices to file, and my indicator will read daly data from that file in Initialise().

        Why I don't want to add second DataSeries on chart and to load 4 years (or more) of 1 min data:
        1) I haven't 4 years 1 min history
        2) Speed of chart loading and chart calculations.
        fx.practic
        NinjaTrader Ecosystem Vendor - fx.practic

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by KonalGondal, Today, 10:18 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by Jorge.andres.o, Today, 09:24 AM
        2 responses
        8 views
        0 likes
        Last Post Gland1
        by Gland1
         
        Started by Oracletrades, Today, 09:02 AM
        4 responses
        8 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by JTizz, Today, 08:17 AM
        7 responses
        25 views
        0 likes
        Last Post JTizz
        by JTizz
         
        Started by Johnny Santiago, 07-30-2020, 07:30 PM
        9 responses
        37 views
        0 likes
        Last Post brucerobinson  
        Working...
        X