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 mattbsea, Today, 05:44 PM
      0 responses
      5 views
      0 likes
      Last Post mattbsea  
      Started by RideMe, 04-07-2024, 04:54 PM
      6 responses
      31 views
      0 likes
      Last Post RideMe
      by RideMe
       
      Started by tkaboris, Today, 05:13 PM
      0 responses
      2 views
      0 likes
      Last Post tkaboris  
      Started by GussJ, 03-04-2020, 03:11 PM
      16 responses
      3,282 views
      0 likes
      Last Post Leafcutter  
      Started by WHICKED, Today, 12:45 PM
      2 responses
      20 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Working...
      X