Problem Alert in RSI

 

Please, i need help.

I probe till now a long time, but i can not find a solution.

i only want hear an alert when RSI is down the 30 line, and up the 70 line on close bar.

i maked lines in indicator:

extern bool AlertSet=true;

int start()

{

if (AlertSet==true && RSIBuffer >70)

Alert("Buy ",Symbol()," ",Period());

} return(0);

}

i am not shure with this lenguage.

can someone help me?

thanks a lot

wz

 

Hi,

try this:

if(AlertSet==true){

if(RSIBuffer[1]>70 && RSIBuffer[2]<70){

Alert("Buy ",Symbol()," ",Period());

}

else if(RSIBuffer[1]30){

Alert("Sell ",Symbol()," ",Period());

}

}

 

thank you

thats looks better.

thank you very much :-)

wz