I am currently working around some really basic stuff and I can't wrap my head around this one.
How would a simple program look that would do nothing else but count the amount of ticks recieved in a 30 second period?I'm asking for the actual code that can be executed. I will be forever grateful.
Every time OnTick() is executed you have received a new tick.
But bear in mind you don't get all the ticks!
You can use Volume which is not the trades (money-) volume but the amount of ticks of that bar. Look in the editor's reference for Volume
int count = 0;
datetime now = TimeCurrent()
if( condition ) countingBegin = now; count = 0; // Begin counting
if(now - countingBegin < 30) ++count; // Still counting
Print(count); // current count.
I am grateful. Worry not.
I have no plans on using the community as my codebase, I merely suffered from the inability to proceed any coding whatsoever beacuse of this issue and needed it resolved not via suggestions, but cold hard code that I can use. Immediately upon reading your result I've thought up of a workaround which serves me well.Thanks again.
To add comments, please log in or register