• 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

runtime loading of historical data

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

    runtime loading of historical data

    (I've searched and see no posts on this topic so..)
    A couple of questions of loading historical data at run time:
    This is on single instrument, multiple timeframes (let's assume primary is 30m, and 2nd is 180m).

    1. Is it possible to, at runtime, to change the '# of days' loaded in a chart?
    2. Is it possible to load say 360 days for the 180m, and only 60 days for 30m?

    Thanks.

    #2
    Hello balancenv,

    Thank you for you post.

    For your first inquiry, yes, you can change the number of days in a chart.

    For you second inquiry, it depends on the instrument and your data provider. If the data provider provides 360 days of data, then yes, you can load a 360 day chart.

    Also, to create a 180 minute interval chart with 360 days loaded, go to the control center: File > New > Chart...

    Select "Type", set it to "Minute". Select "Value", set it to 180. Set "Days to load" to 360.

    To create 30 minute interval chart with 60 days loaded:

    Select "Type", set it to "Minute". Select "Value", set it to 30. Set "Days to load" to 60.
    Riley S.NinjaTrader Customer Service

    Comment


      #3
      Apologize if I was not clear.
      The question is, can I reload/change # of days to load via API, while the strategy is running?
      The 2nd question is on the same chart, loading multiple time frames of the same instruments, but of different # of days.

      Comment


        #4
        Hello balancenv,

        For the first question, yes, you can change the number of days to load while running a strategy. Just right-click in the background of the chart, select Data Series...

        Once the data series window appears, select "Days to load", set it to your desired value.

        For the second question, also yes, you can create new charts with the same instrument with different time frames. Just create a new chart with new a interval.
        Riley S.NinjaTrader Customer Service

        Comment


          #5
          please show how to do it via API. No one is in front of the PC to 'right click'!

          Comment


            #6
            Hello balancenv,

            If you reload the chart with strategy running on it will cause the strategy to disable an re-enable. This starts over and causes the historical data to be reprocessed.

            If using the API, the orders will not be generated from within NinjaTrader, but from a 3rd party custom program. It is possible to request any data and send any orders through the API, this will not involve NinjaScript Strategies at all.

            If using a NinjaScript Strategy, it is not possible to change or set the amount of historical data programmatically.
            Riley S.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by SAILIKITY, 05-22-2019, 05:41 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_PaulH  
            Started by rmillar, 01-09-2019, 06:02 PM
            6 responses
            64 views
            1 like
            Last Post eDanny
            by eDanny
             
            Started by mlarocco, Today, 11:39 AM
            4 responses
            20 views
            0 likes
            Last Post mlarocco  
            Started by roblogic, Today, 11:19 AM
            4 responses
            21 views
            0 likes
            Last Post roblogic  
            Started by saeed, Today, 10:17 AM
            8 responses
            53 views
            0 likes
            Last Post NinjaTrader_Kate  
            Working...
            X