Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar building and synching

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

    Bar building and synching

    Hi, in 6.5, if I have a strategy that takes a long position at 3:00 am but load the strategy at 2:30 or so with an hourly time frame, it doesn't take the trade even though the correct set up exists. Is this because it is inside the fist bar and my (ToTime(Time[0])) == 30000 question doesn't get asked unit the end of the bar(3:30)?
    If this is how it works, is there a way to synch an hourly bar to the actual hour of the day?
    Thanks

    #2
    Hi Stem1,

    If your hourly bars are timestamped at every half hour (2:30, 3:30) the condition will never be satisfied (Time == 30000), since the strategy refers to the timestamp value.

    If your Session Begins time starts on a half hour, say 9:30, each bar following will be stamped at half hour intervals, 10:30, 11:30 etc.

    You can either change the Session times, or change you condition. Also, use Print() statements to ensure any other conditions are truly being satisfied.
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks. Makes sense.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      77 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      27 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      64 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X