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

Historical Tick Data Limitation on Multiple Timeframes

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

    Historical Tick Data Limitation on Multiple Timeframes

    I'm attempting to develop a multi-timeframe indicator that's based on Tick data. I have the following code in my Initialize routine

    Add(PeriodType.Tick, 1);

    In OnBarUpdate I'm checking for BarsInProgress == 1 and performing calculations on the tick data.

    The issue I'm having is my indicator is only loading a few hundred ticks even though I have a full day's worth of 5 minute data on the chart. Is there a limitation on the number of ticks ninjatrader will load? I've even tried setting Maximum bars look back = Infinite.

    #2
    Welcome here to our forums simmen: there's no NT imposed tick limitation at play here - what data provider are you working with? Are you able to create a longer lookback tick chart manually that populates as you wish?

    The # of bars loaded for the added series would depend on the primary series on your chart that the indicator is then loaded on, once the BarsRequired is fulfilled for all series the OnBarUpdate() would be started to get called in the script.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I'm using eSignal and I am able to load over a full day's worth of tick data. It seems the OnBarUpdate method is being called for the 5 minute bar first and for the tick data second. I've placed a print method in the OnBarUpdate routine and I receive the following.

      5 Min: 1296.25
      5 Min: 1295.5
      5 Min: 1295.5
      5 Min: 1294.25
      5 Min: 1294.75
      5 Min: 1294.75
      5 Min: 1295.25
      5 Min: 1295
      5 Min: 1294.5
      5 Min: 1294.5
      5 Min: 1295
      5 Min: 1294.75
      5 Min: 1294.25
      5 Min: 1294.25
      5 Min: 1294
      5 Min: 1294.5
      5 Min: 1294
      5 Min: 1295
      5 Min: 1294.75
      5 Min: 1295.75
      5 Min: 1296
      5 Min: 1297
      5 Min: 1297.25
      5 Min: 1296.5
      5 Min: 1297.25
      5 Min: 1298
      5 Min: 1297.5
      5 Min: 1298
      5 Min: 1297.5
      5 Min: 1297.75
      5 Min: 1299.75
      5 Min: 1300
      5 Min: 1300.75
      5 Min: 1300.5
      5 Min: 1301
      5 Min: 1300.25
      5 Min: 1298.75
      5 Min: 1299.75
      5 Min: 1302.75
      5 Min: 1302
      5 Min: 1301.75
      5 Min: 1302.25
      5 Min: 1300.75
      5 Min: 1299.5
      5 Min: 1300
      5 Min: 1299.75
      5 Min: 1301
      5 Min: 1300.25
      5 Min: 1301.5
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1300.75
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1300.75
      1 Tick: 1301
      1 Tick: 1300.75
      1 Tick: 1301.25
      1 Tick: 1301.5
      1 Tick: 1301.5
      1 Tick: 1301.5
      1 Tick: 1301.5
      1 Tick: 1301.5
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1301.5
      1 Tick: 1301.5
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1301.25
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1300.75
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301
      1 Tick: 1301

      Notice that all the tick data comes from the last bar. Then my Plot method outputs the tick volume values aggregated by the OnBarUpdate method.

      1300.75 = 13
      1301 = 130
      1301.25 = 50
      1301.5 = 26

      I have CalculateOnBarClose = true;

      Comment


        #4
        I figured it out. I had BarsToLoad = 50 and I didn't realize this applies to both series. You'd think the Tick data would load for all 5 minute bars on the chart, but this is not the case.

        Comment


          #5
          Glad to hear you got it figured out - correct BarsToLoad would apply to each series.
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by benmarkal, Yesterday, 12:52 PM
          3 responses
          23 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by helpwanted, Today, 03:06 AM
          1 response
          20 views
          0 likes
          Last Post sarafuenonly123  
          Started by Brevo, Today, 01:45 AM
          0 responses
          11 views
          0 likes
          Last Post Brevo
          by Brevo
           
          Started by pvincent, 06-23-2022, 12:53 PM
          14 responses
          244 views
          0 likes
          Last Post Nyman
          by Nyman
           
          Working...
          X