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

How to tell the last tick of the Range Bar

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

    How to tell the last tick of the Range Bar

    I notice setting CalculateOnCloseBar = true gives me the calculation on the close bar. But I want to be able to check if the current tick is the last tick of the Range Bar.

    #2
    The last tick of a bar is only realized when the first tick of a new bar appears. To determine this information you need to do this:

    Code:
    if (FirstTickOfBar)
         Print("Last tick of closing bar: " + Close[1]);
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      But how come if you set the 'CalculateOnBarClose' to true, NT can actually perform the calculation on the close bar

      Comment


        #4
        It performs it at the first tick of the new bar in the exact same manner I just showed you above.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ZeroKuhl, Today, 04:31 PM
        0 responses
        14 views
        0 likes
        Last Post ZeroKuhl  
        Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
        54 responses
        5,337 views
        0 likes
        Last Post Gaterz
        by Gaterz
         
        Started by ETFVoyageur, 05-07-2024, 07:05 PM
        11 responses
        76 views
        0 likes
        Last Post -=Edge=-  
        Started by _Zero_, 04-10-2020, 03:21 PM
        145 responses
        7,900 views
        6 likes
        Last Post johng2
        by johng2
         
        Started by TheTradingMantis, 01-19-2023, 02:05 AM
        43 responses
        923 views
        0 likes
        Last Post jmagaia
        by jmagaia
         
        Working...
        X