Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateOnBarClose

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

    CalculateOnBarClose

    Am I right that the last closing tick event of a bar is also the first opening tick of the next bar?

    So if OnBarUpdate() is triggered on the bar close (if CalculateOnBarClose = True)
    should FirstTickofBar be true?

    #2
    futurenets, you are correct in understanding - in out event based architecture the bars are not considered closed until the open tick of the new bar is seen, so opening tick and closing tick are essentially the same.

    Comment


      #3
      ok thanks

      but I don't think FirstTickofBar is true when this happens?

      so if CalculateOnBarClose = True then the script will be executed on the closing tick of the bar Close[0]

      if CalculateOnBarClose = False then the script will be executed on all ticks
      and FirstTickOfBar = True on the opening tick of the bar Close[0] (this is the bar after the above)?
      Last edited by futurenets; 03-02-2015, 02:21 AM.

      Comment


        #4
        It would be, it's the same (closing) tick.

        Comment


          #5
          ok thanks.

          Just getting a bit confused on which bar Close[0] refers to when FirstTickOfBar = True

          e.g. if last tick on last bar of week closes on Friday then the same tick can't open the next bar until Monday?

          Comment


            #6
            Originally posted by futurenets View Post
            ok thanks.

            Just getting a bit confused on which bar Close[0] refers to when FirstTickOfBar = True

            e.g. if last tick on last bar of week closes on Friday then the same tick can't open the next bar until Monday?
            The bar would not be closed on Friday, it would close as you saw the first tick on Monday (CalculateOnBarClose given true in this example)

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            599 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            344 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            558 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            558 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X