Download MetaTrader 5

strategy tester generates lots of indicator

To add comments, please log in or register
mahdi_z
9
mahdi_z 2016.07.16 12:40 

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
4788
Ernst Van Der Merwe 2016.07.16 13:01  
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
9
mahdi_z 2016.07.16 13:12  
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

To add comments, please log in or register