Counting Ticks

 
Is there a sub routine or a function that I can use to count the number of ticks?

For example, when I start an EA, I want to wait for 200 ticks before I do something. How can I do it?

Thanks.
 

int TickCounter = 200; // global variable

int start()
{
    if (TickCounter > 0)
    {
        TickCounter--;
        return (0);
    }

// The EA code here

}
 

int TickCounter = 200; // global variable

int start()
{
    if (TickCounter > 0)
    {
        TickCounter--;
        return (0);
    }

// The EA code here

}





Thanks for the code. :)
Reason: