Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        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)
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by GLFX005, Today, 03:23 AM
            0 responses
            1 view
            0 likes
            Last Post GLFX005
            by GLFX005
             
            Started by XXtrader, Yesterday, 11:30 PM
            2 responses
            11 views
            0 likes
            Last Post XXtrader  
            Started by Waxavi, Today, 02:10 AM
            0 responses
            6 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Started by TradeForge, Today, 02:09 AM
            0 responses
            14 views
            0 likes
            Last Post TradeForge  
            Started by Waxavi, Today, 02:00 AM
            0 responses
            3 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Working...
            X