Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Missing 1 minute candles

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

    Missing 1 minute candles

    I created a 1 min chart of ES-06 and added an indicator with the following code to check for missing candles:
    Code:
    protected override void OnBarUpdate()
    {
    			if(CheckPeriodicity() == false)
    				Print("Periodicity check failed @ " + Time[0].ToString());
    }
    
    
    		bool CheckPeriodicity()
    		{
    			if(BarsPeriod.Id != PeriodType.Minute || CurrentBar < 0)
    				return true;
    			bool retval = false;				
    			int periodicity = BarsPeriod.Value;
    			if(CurrentBar > 0)
    			{
    				TimeSpan ts0  = Time[0] - Time [1] ;
    				retval = periodicity == (int)ts0.TotalMinutes;		
    			}
    			retval = retval && (BarsPeriod.Id == PeriodType.Minute);
    			return retval;		
    		}
    I see a lot of candles missing. please advice. thanks

    #2
    Newworldguy,

    What are the times that you see these missing candles?

    Can you show me the output window prints?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Screen shot of output window.

      here it is. or you can just cut and paste the code into a new indicator and run it. Pretty easy to replicate on, I will assume any time duration and possibly multiple instruments. I tried on ES-06-14 so far.

      thanks for the attention.
      Attached Files

      Comment


        #4
        newworldguy, which feed / broker connection do you run this on to test? In NT everything is done event based, so you do not have to have a new candle / timestamp each minute, if there was no trade event > then a candle could definitely be missing, however uncommon for a liquid instrument as the ES. Do you see this both in realtime and backtesting use? What data would the historical data manager show as confirm for the period tested?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X