Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why does Bars.TotalTicks not look right?

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

    Why does Bars.TotalTicks not look right?

    What am I missing ….

    Say I have a 100 tick chart of the TF (no sessions …. 24/7 … 5 days back of data).

    CurrentBar (total # of bars on chart) = 4062
    …. at 100 ticks per bar …. I should have close to 406,200 total ticks

    How come Bars.TotalTicks only shows: 289,499 ? That’s almost 30% lower than I’d expect.


    I’m just using:
    Code:
    [FONT=Courier New][COLOR=black][COLOR=black][FONT=Courier New]DrawTextFixed([/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"tag1"[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"TotalTicks: "[/FONT][/COLOR][COLOR=black][FONT=Courier New] + Bars.TotalTicks + [/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"\nCurrentBar: "[/FONT][/COLOR][COLOR=black][FONT=Courier New] + CurrentBar,  TextPosition.TopLeft);[/FONT][/COLOR]
    [/COLOR][/FONT]
    Attached Files

    #2
    Hello,

    Thanks for the forum post.

    When a new session begins and a new day in your case with Default 24/7 a new tick bar will be created regardless of if the number of ticks to complete the bar is satisfied.

    We do this as we needed to force an OnBarUpdate when a new session starts for the session logic to work correctly. Therefor you could have a bar at the start of a new session that ends prematurely. This is true with Range, Volume and Tick charts.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Brett,

      I think I understand you, but something is still way off.

      So maybe 5 bars got 'cut short' on their ticks for the 5 session start events.... that would explain a difference of less than 500 ticks when using 100 tick bars.

      But I'm still missing 116,000 ticks somehow on this simple concept study.

      If you plug in that one line of code on any tick chart, does Bars.TotalTicks come close to: # of bars * tick count? Even understanding the expected offset of < a bar's worth of ticks each session, something is still awry.

      Thanks

      Comment


        #4
        Hello,

        Not sure how much data you had loaded in your test.

        When I test on my side see the below screenshot. I get the expected results.

        There are a few more ticks counted then exact since I'm loading a 1 day chart and to load 1 day there is some bleed over into the next day for the session template which is expected.

        Whats different between are setups? How many days you testing? If you test 1 do you get the same results as me?

        Let me know if I can be of further assistance.
        Attached Files
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        664 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        376 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X