Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars.TickCount for previous bar

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

    Bars.TickCount for previous bar

    How do I get the Tickcount for the previous bar or any particular bar.

    #2
    Hello cutzpr,

    There is not series of tick counts. You would need to save this with custom C# logic.

    You could save this to your own custom series.
    https://ninjatrader.com/support/helpGuides/nt8/en-us/?iseriest.htm
    https://ninjatrader.com/support/helpGuides/nt8/en-us/?tickcount.htm

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I wouldn't mine the tick data that is used for Market Replay/Tick Replay. Is that data accessible?

      Comment


        #4
        Hello cutzpr,

        The data used for TickReplay is historical tick data that is stamped by the provider with the ask and bid the moment the tick was produced.

        To use this enable TickReplay in Tools > Options > Market data > Real-time > Show Tick Replay. Then enable TickReplay in the Data Series window for the chart or in the strategy parameters (if not on a chart). Then set Calculate to .OnEachTick in State.SetDefaults.

        Below is a public link to the help guide.


        In the script this causes OnBarUpdate to trigger for each tick historically and OnMarketData to update historically.

        The ask and bid can be found in OnMarketData with marketDataUpdate.Ask/marketDataUpdate.Bid.

        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          So essentially, regardless, I would still have to do a counter on the series. I couldn't be able to reference those ticks of the previous bar in the array even using tick replay.

          Comment


            #6
            Hello cutzpr,

            There are no series of tick counts stored by NinjaTrader. You would need to create this.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            42 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            20 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            29 views
            1 like
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            46 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            38 views
            0 likes
            Last Post CarlTrading  
            Working...
            X