Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Output from Bars.TickCount includes strange bar details

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

    Output from Bars.TickCount includes strange bar details

    I'm planning to use TickCount in a new indicator and I built a very simple test to check the output from TickCount.

    The code in OnBarUpdate simply contains this:

    protected override void OnBarUpdate()
    {

    Print(string.Format("Bar {0} The tick count of the current bar is {1} ", CurrentBar, Bars.TickCount.ToString()));
    }

    But when I run this on a 250 tick chart with Tick Replay enabled, I see the following output:

    Bar 18979 The tick count of the current bar is 247
    Bar 4744381 The tick count of the current bar is 1
    Bar 18979 The tick count of the current bar is 248
    Bar 4744382 The tick count of the current bar is 1
    Bar 18979 The tick count of the current bar is 249
    Bar 4744383 The tick count of the current bar is 1
    Bar 18979 The tick count of the current bar is 250
    Bar 4744384 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 1
    Bar 4744385 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 2
    Bar 4744386 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 3
    Bar 4744387 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 4
    Bar 4744388 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 5
    Bar 4744389 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 6
    Bar 4744390 The tick count of the current bar is 1
    Bar 18980 The tick count of the current bar is 7
    Bar 4744391 The tick count of the current bar is 1

    Why do I see these strange bar numbers, all with a tick count of 1 on every alternate line?

    #2
    Hello toughcookie,

    Thank you for your inquiry.

    In my testing with Tick Replay on a 1 minute ES 12-20 chart and , I don't see the same. Who is your data provider, and what instrument are you testing on?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hello Kate,

      My data provider is CQG. The chart I was testing on was ES 09-20, 250 tick. I ran Tick Counter on the same chart and it worked OK, so I'm sure it's something wrong in my indicator.

      Comment


        #4
        Hello Kate,
        Sorry, my bad. I just noticed I had left an Add Data Series instruction in the State == State.Configure section for a 1 tick data series.
        I removed that and it now works OK.
        Sorry for wasting your time.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        650 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X