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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        44 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        56 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        35 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        95 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        57 views
        0 likes
        Last Post PaulMohn  
        Working...
        X