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

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 funk10101, Today, 12:02 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Started by GLFX005, Today, 03:23 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by nandhumca, Yesterday, 03:41 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by The_Sec, Yesterday, 03:37 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by vecnopus, Today, 06:15 AM
            0 responses
            1 view
            0 likes
            Last Post vecnopus  
            Working...
            X