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 AaronKoRn, Today, 09:49 PM
      0 responses
      1 view
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Today, 08:42 PM
      0 responses
      6 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      8 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,974 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X