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 f.saeidi, Today, 08:01 PM
      0 responses
      4 views
      0 likes
      Last Post f.saeidi  
      Started by Rapine Heihei, Today, 07:51 PM
      0 responses
      3 views
      0 likes
      Last Post Rapine Heihei  
      Started by frslvr, 04-11-2024, 07:26 AM
      5 responses
      96 views
      1 like
      Last Post caryc123  
      Started by algospoke, 04-17-2024, 06:40 PM
      6 responses
      49 views
      0 likes
      Last Post algospoke  
      Started by arvidvanstaey, Today, 02:19 PM
      4 responses
      11 views
      0 likes
      Last Post arvidvanstaey  
      Working...
      X