Tick Chart : retrieving how many tick has ticked

Created at 04 Jun 2019, 18:34
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
12

1222Ht

Joined 11.11.2017

Tick Chart : retrieving how many tick has ticked
04 Jun 2019, 18:34


Hi, Thank you very much for reading my question .

Im using the tick chart and want to know when the bar closes, for example like in 500ticks chart , when the tick reaches 480 is there a way i can get that in data and so i can get ready for the bar closes . 

at the moment , im doing  :

   private int Current_Index;
        private int Tick_Counter;
        private double Bid;

        public override void Calculate(int index)
        {
            if (Current_Index != index)
            {
                Current_Index = index;
                Tick_Counter = 1;
            }

            if (Bid != Symbol.Bid)
            {
                Bid = Symbol.Bid;

                Tick_Counter += 1;
            }



            Chart.DrawStaticText("Tick Count", Tick_Counter.ToString(), VerticalAlignment.Bottom, HorizontalAlignment.Right, Color.Lime);

 

 

I dont know if this is robust .

 

Thank you very much


@1222Ht
Replies

PanagiotisCharalampous
05 Jun 2019, 09:13

Hi 1222Ht,

It seems fine to me. Is there anything you need help with?

Best Regards,

Panagiotis


@PanagiotisCharalampous

1222Ht
26 Jun 2019, 18:21

Panagiotis,

 

Thank you very much for your reply


@1222Ht