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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      146 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      71 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X