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 StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,992 views
        3 likes
        Last Post johntraderuser2  
        Started by TAJTrades, Today, 09:46 AM
        0 responses
        7 views
        0 likes
        Last Post TAJTrades  
        Started by rhyminkevin, Yesterday, 04:58 PM
        5 responses
        62 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by realblubb, Today, 09:28 AM
        0 responses
        8 views
        0 likes
        Last Post realblubb  
        Started by AaronKoRn, Yesterday, 09:49 PM
        1 response
        19 views
        0 likes
        Last Post Rikazkhan007  
        Working...
        X