Tick Chart : retrieving how many tick has ticked
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
PanagiotisCharalampous
05 Jun 2019, 09:13
Hi 1222Ht,
It seems fine to me. Is there anything you need help with?
Best Regards,
Panagiotis
@PanagiotisCharalampous