Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Barchart data timestamps changing

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

    Barchart data timestamps changing

    Hi,

    I'm using a data feed from Barchart with 10min bars to analyze some strategies in the strategy analyzer. With a year's data, some bars are starting at 13:40pm and others start at 14:40pm.

    Also, some day periods have 41 bars, whilst others have 40 bars.

    Is this due to effects such as daylight saving / early session end times? Or do I need to ask Barchart?

    I have a strategy which is entering trades at a certain time relative to the start of the day. However, sometimes the trade is missed because of these bar differences.

    I'm using the format
    ToTime(Time[
    0]) == 182000
    as the trade trigger
    Any ideas gratefully received!

    Thanks,

    Olly
    Last edited by ollywedgwood; 06-10-2010, 11:01 AM.

    #2
    Hello Olly,

    One note here is that time stamps will be the end of the bar, not the start of the bar.
    See here for more information on how NinjaTrader builds chart bars.

    BarChart will use native time stamps and are the best ones to contact regarding the session times of their data. There can definitely be issues related to daylight savings time changes and trading hours changes.

    One thing you can do in NinjaTrader is include a range of time for your entry conditions.

    Example:
    if (ToTime(Time[0]) >= 182000 && ToTime(Time[0]) <= 183000)

    One potential issue with this is that your conditions can evaluate to true for multiple bars. To resolve you could check a bool flag and set the opposite within the same block that places orders. The bool flag can then be reset at the start of the day with Bars.FirstBarOfSession

    The reference sample below can help further with this:
    Resetting values at the beginning of new trading sessions




    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan - Bars.FirstBarOfSession has done the trick!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      103 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      52 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      34 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      37 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      74 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X