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 cre8able, 02-11-2023, 05:43 PM
      3 responses
      235 views
      0 likes
      Last Post rhubear
      by rhubear
       
      Started by frslvr, 04-11-2024, 07:26 AM
      8 responses
      113 views
      1 like
      Last Post NinjaTrader_BrandonH  
      Started by stafe, 04-15-2024, 08:34 PM
      10 responses
      45 views
      0 likes
      Last Post stafe
      by stafe
       
      Started by rocketman7, Today, 09:41 AM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by traderqz, Today, 09:44 AM
      2 responses
      10 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X