Retrieve the number of remaining ticks ?

Forums ProRealTime English forum ProBuilder support Retrieve the number of remaining ticks ?

Viewing 5 posts - 1 through 5 (of 5 total)
  • #227514

    Hello,

     

    Just a quick question : is there a way to retrieve the number of remaining ticks in the current tick candle ? There is the counter indicated with the white arrow on the attached image but I don’t find a way to use it in a custom indicator ?

    Do you have any suggestion on what i can do to achieve this goal ?

     

    Sincerely.

    #227524

    By using the code from this post: https://www.prorealcode.com/topic/tick-indicator/#post-209765

    I think that you will see the total amount of ticks by changing the last line to return the $ticks count:

     

    #227544

    Hello Nicolas,

    Thank you for your answer.

    I tried to modify the code you suggested in this way :

    Indeed, it creates a Tick counter but I made a test on several 2000 ticks candles but it doesn’t return 2000 on each candle but 1583, 1700, 1800… Do you have any idea to have a correct result ? It seems some ticks don’t trigger the islastbarupdate function. Am I wrong ?

    Sincerely.

    #227586

    Assuming it hasn’t changed too much since last time I looked into it, the ticks received and counted in any method similar to the one proposed above are not a strict match to tick by tick, therefore when in (x)ticks charts the array in a personal code won’t receive x of them per candle, because it wraps up ticks being in same timestamp as being “one” instead of multiple, whereas the platform built-in ticks counter is able to differenciate them and count all of them (that means not just 2 separate transactions that could theoretically be so close from each other they are in same timestamp, but also more frequently the case of a market order meeting more than one limit order the opposite way: probuilder code with arrays would count these as one, built-in tick-by-tick would be able to count these as being as many as amount of filled limit orders by the solo market order). So you’ll always have some “missing”, and can’t assess how many remain in your [x] ticks candles.

    As far as I can assess, next batch of new coding instructions might help to get a closer count with some extra maths, but it would still be inaccurate anyway.

    As per forum use guidance in yellow box at bottom of this page just before the “submit” message button, please don’t double-post, I have to delete your same request in the other 2 posts yesterday and today to keep only current topic as active. Thanks.

    #227607

    Hello,

    Thank you for your detailed answer.

    I fully understand. Sorry for double post.

    Sincerely.

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login