• 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.


No announcement yet.

Partner 728x90


Missing Multi-Series Bar Data

  • Filter
  • Time
  • Show
Clear All
new posts

    Missing Multi-Series Bar Data

    I can open a new chart with 15 Minute bars from 1/1/2015 to today and view that time frame. (All data is available)
    I can open a new chart with 1 Month bars from 1/1/2015 to today and view that time frame.(All data is available)
    I can run the following code in strategy analyzer and the first Monthly bar doesn't become available until 11/30/2016

    On 11/30/2016 Month Bars Available first shows a 0 instead of -1 for CurrentBars[1] print output.
    This was found across many symbols of the SP500 list and last tested on ABB.
    Latest NT version running on Kinetick data.

    Is anyone else seeing this as well?

    #region Using declarations
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Gui.Tools;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;
    using NinjaTrader.NinjaScript.Indicators;
    using NinjaTrader.NinjaScript.DrawingTools;
    namespace NinjaTrader.NinjaScript.Strategies
        public class RCTest : Strategy
            protected override void OnStateChange()
                if (State == State.SetDefaults)
                    Description                                        = @"Missing Data Series Test";
                    Name                                            = "RCTest";
                    IsAdoptAccountPositionAware                        = true;
                    StartBehavior                                    = StartBehavior.AdoptAccountPosition;
                    Calculate                                        = Calculate.OnBarClose;
                    EntriesPerDirection                                = 3;
                    EntryHandling                                    = EntryHandling.AllEntries;
                    IsExitOnSessionCloseStrategy                    = false;
                    ExitOnSessionCloseSeconds                        = 90;
                    IsFillLimitOnTouch                                = false;
                    MaximumBarsLookBack                                = MaximumBarsLookBack.Infinite;
                    OrderFillResolution                                = OrderFillResolution.Standard;
                    Slippage                                        = 0;
                    TimeInForce                                        = TimeInForce.Gtc;
                    TraceOrders                                        = false;
                    RealtimeErrorHandling                            = RealtimeErrorHandling.IgnoreAllErrors;
                    StopTargetHandling                                = StopTargetHandling.PerEntryExecution;
                    BarsRequiredToTrade                                = 0;
                    DaysToLoad                                        = 450;
                    IsInstantiatedOnEachOptimizationIteration        = true;
                else if (State == State.Configure)
                    AddDataSeries(BarsPeriodType.Month, 1);
            protected override void OnBarUpdate()
                Print(Instrument.MasterInstrument.Name + " ########################");
                Print(Instrument.MasterInstrument.Name + " New OnBarUpdate Starting - " + State + " - Bar#: " + CurrentBar + " Date: " + Time[0]);
                Print("Day Bars Available: " + CurrentBars[0]);
                Print("Month Bars Available: " + CurrentBars[1]);
    //        Monthly Processing
                if (CurrentBars[1] >= 11 && BarsInProgress == 1)
                    Print("     Rolling Year of Data           ");
                    Print("Month Data Would Have Processed Here");
    Output Window:
    ABB ########################
    ABB New OnBarUpdate Starting - Historical - Bar#: 12521 Date: 11/30/2016 4:00:00 PM
    Day Bars Available: 12521
    Month Bars Available: 0
    Last edited by antrux; 02-20-2019, 09:49 AM.

    Hello antrux,

    Thanks for opening the thread and including sample code to test.

    I have attached a demonstration showing how I tested and the results I have gotten.

    Demo - https://drive.google.com/file/d/1ge-...w?usp=drivesdk

    I may suggest restarting the platform and reloading data if you are seeing different results. Also to note, the current version of NinjaTrader 8 is release 17.2, so I would recommend updating if you have not already.

    If you still see those results after taking these steps, could you provide some more detail so I can reproduce on my end? A screenshot of the Strategy Analyzer and the time zone you have configured in the Options menu of the Control Center will help me to do the same test.

    I look forward to assisting you further.
    JimNinjaTrader Customer Service


      Wow ok, a restart did correct that issue for ABB and a few others.
      Randomly tested on a few others and found MSFT and ALB only going back to Jan 2017.
      Does yours do this as well?

      For those two I do only see chart data going back to the same date of Jan 2017 so maybe those are just Kinetick not having enough history?


        Hello antrux,

        I tested opening charts for MSFT and ALB starting from January 2015 and I was able to retrieve the same data as in the demo video. Kinetick promises 2+ years worth of Minute data and 10+ years for Daily data. More data is available for more popular instruments.

        I may suggest using the Reload All Historical Data operation to request this data from Kinetick again and to make sure that you are directly connected to your router/modem and you are not experiencing any connection issues that would interrupt the historical data request.

        If issues persist, you could move the data off your platform and open a new chart or use Reload All Historical data to request the data again. Historical data is stored in the Documents/NinjaTrader 8/db/day and Documents/NinjaTrader 8/db/minute/ folders respectively for minute and daily data.

        I look forward to being of any further assistance.
        JimNinjaTrader Customer Service


        Latest Posts


        Topics Statistics Last Post
        Started by HiddenPhilosopher, Today, 06:45 AM
        1 response
        Last Post NinjaTrader_ChelseaB  
        Started by PG7940, Today, 04:26 AM
        1 response
        Last Post NinjaTrader_ChelseaB  
        Started by Sh00tHerMcGavin, Yesterday, 07:39 PM
        1 response
        Last Post NinjaTrader_ChelseaB  
        Started by dltharpe, Today, 09:17 AM
        0 responses
        Last Post dltharpe  
        Started by marcus2300, Today, 02:25 AM
        0 responses
        Last Post marcus2300