I am writing a multi time frame indicator which shows dots placed in a line in a separate window. I want to restrict the number of dots to 3 ( for displaying a 15 min bars on a 5 min chart)
The relevant section of code I am using is this.
int start()
{
int i,limit;
limit = (TimeFrame1/Period())-1;
for (i=limit; i>= 0; i--)
etc etc
However, what happens is that after another 5 min passes, the number of bars now goes up to 4, and increases after each 5 mins.
What is the process for restricting the number of bars to the original 3?
The relevant section of code I am using is this.
int start()
{
int i,limit;
limit = (TimeFrame1/Period())-1;
for (i=limit; i>= 0; i--)
etc etc
However, what happens is that after another 5 min passes, the number of bars now goes up to 4, and increases after each 5 mins.
What is the process for restricting the number of bars to the original 3?