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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        548 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        549 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X