strategy tester generates lots of indicator

 

hi guys 

i have problem whit strategy tester. i wrote a script as  follow. when i run the strategy tester, in every tick, a new indicator well add to the chart. 

whats the problem?

thanks

void OnTick()

  {

int r=0;

double rr[]={0,0,0};

 r=iCustom(NULL,tp[i],"jjrsx",8,8,100,STO_CLOSECLOSE,0)

 CopyBuffer(r,0,0,3,rr);

 if(rr[2]>rr[1])

 Print(" alert");

  

  } 

 
int r=0;

void OnInit()

  {
 
 r=iCustom(NULL,tp[i],"jjrsx",8,8,100,STO_CLOSECLOSE,0);

  }

void OnTick()

  {

 double rr[]={0,0,0};

 CopyBuffer(r,0,0,3,rr);

 if(rr[2]>rr[1])

 Print(" alert");

  

  } 
 
mahdi_z:

hi guys 

i have problem whit strategy tester. i wrote a script as  follow. when i run the strategy tester, in every tick, a new indicator well add to the chart. 

whats the problem?

thanks

void OnTick()

  {

int r=0;

double rr[]={0,0,0};

 r=iCustom(NULL,tp[i],"jjrsx",8,8,100,STO_CLOSECLOSE,0)

 CopyBuffer(r,0,0,3,rr);

 if(rr[2]>rr[1])

 Print(" alert");

  

  } 

Ernst Van Der Merwe:

thanks alot buudy