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

TickCount

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

    TickCount

    hi - I am seeing that Bars.TickCount returns a constant value on all bars processed when processing historical data. Can I access the tick count for the bar that is currently being processed?

    Onn

    #2
    Hi Onn, your understanding is correct, you could not directly access the historical info unless custom calculated via an added 1 tick series - same topic was addressed for example as well in http://www.ninjatrader.com/support/f...ad.php?t=49902
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi Onn, your understanding is correct, you could not directly access the historical info unless custom calculated via an added 1 tick series - same topic was addressed for example as well in http://www.ninjatrader.com/support/f...ad.php?t=49902
      I see. I have a couple of follow up question to this.

      1. What is the right way to know if the "current bar" the indicator method is processing is the the real time bar and that TickCount currently applies to it? Do I use Historical or compare the CurrentBar to the size of the bars array?

      2. When I load a historical chart, the TickCount is relevant to the last bar on the chart? I.e., the last bar that hasn't closed yet?

      Comment


        #4
        Hi onnb1,

        To know if the current bar is real time use 'if (!Historical) { // execute code }'.

        When loading a chart, the last bar on the chart will be an unclosed real time bar and will have the TickCounter applied.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Today, 06:40 PM
        0 responses
        0 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        6 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        6 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        167 views
        0 likes
        Last Post jeronymite  
        Started by cre8able, Today, 04:22 PM
        0 responses
        8 views
        0 likes
        Last Post cre8able  
        Working...
        X