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 lightsun47, Today, 03:51 PM
        0 responses
        2 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        8 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        41 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        13 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        8 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X