I am writing a multi time frame indior which shows dots placed in a lineup in a separate window. I would like to restrict the number of dots to 3 ( for displaying a 15 min bars on a 5 min chart)
The appropriate section of code I am using is that.
Int start()
{
int I,limit;
restrict = (TimeFrame1/Period())-1;
for (I=limitation; igt;= 0; I--)
etc
However, what happens is that following another 5 min moves, the number of bars now extends up to 4 months, and increases after each 5 mins.
What is the procedure for restricting the number of bars to the 3?