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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            309 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X