Please help!, how to fix the alert to stop flood me!?

 

Please help i tried to add an alert to my code and its just flooding me!, can someone please help me with that please! i need it so badly...!

big big thanks for the helpers!



#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_buffers 3
#property indicator_color1 White
#property indicator_color2 GreenYellow
#property indicator_color3 Red

#property indicator_width1 2
#property indicator_width2 1
#property indicator_width3 1

#property indicator_levelcolor DimGray
#property indicator_level1 70
#property indicator_level2 30
//---- input parameters
extern int PeriodRSI=50;
extern bool SoundAlert = true; ////////////////// NEED TO FIX! <<
extern string none = "///////////////////////";
extern string uniqueID = "On chart signals settings:";
extern bool showOnChartText = false;
extern string textForUpPeak = "x";
extern color colorForUpPeak = Red;
extern string textForDownPeak = "x";
extern color colorForDownPeak = GreenYellow;
extern int fontsize = 10;
extern int Arik_Was_Here = true;
//---- buffers
double RSILine1[];
double SupLevel2[];
double ResLevel3[];


//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,RSILine1);

SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,251);
SetIndexBuffer(1,SupLevel2);
SetIndexEmptyValue(1,0.0);
SetIndexDrawBegin(1,1);
SetIndexLabel(1,"SupLevel");

SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(2,251);
SetIndexBuffer(2,ResLevel3);
SetIndexEmptyValue(2,0.0);
SetIndexDrawBegin(2,1);
SetIndexLabel(2,"ResLevel");


string short_name="RSI";
IndicatorShortName(short_name);



//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
string lookFor = uniqueID+":";
for (int i=ObjectsTotal(); i>=0; i--)
{
string name = ObjectName(i); if (StringFind(name,lookFor)==0) ObjectDelete(name);
}
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
double rsi1,rsi2,rsi3,rsi4;
static datetime previousTime = 0;


//Draw RSI & Plot the Peak/Bottom RSI
if (counted_bars<0) return(-1);

if (counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

for (int i=0; i<limit; i++)
{
RSILine1=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,i);

rsi1=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,i+1);
rsi2=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,i+2);
rsi3=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,i+3);
rsi4=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,i+4);

double atr = iATR(NULL,0,10,i);
ObjectDelete(uniqueID+":"+Time[i+2]);

if ((rsi1rsi3) || (rsi1rsi4))
{
ResLevel3[i+2]=rsi2; //Menandai Level Resistance
SetComment(High[i+2]+atr,Time[i+2],textForUpPeak,colorForUpPeak);
//if (SoundAlert) {doAlert(" Resistance");}
}
if ((rsi1>rsi2 && rsi2rsi2 && rsi2==rsi3 && rsi3<rsi4))
{
SupLevel2[i+2]=rsi2; //Menandai Level Support
SetComment(Low[i+2]-atr,Time[i+2],textForDownPeak,colorForDownPeak);
//if (SoundAlert) {doAlert(" Support");}
}
}
return(0);
}

void SetComment(double price, datetime time, string text,color theColor)
{
if (!showOnChartText) return;
string name = uniqueID+":"+time;
ObjectCreate(name,OBJ_TEXT,0,0,0);
ObjectSet(name,OBJPROP_PRICE1,price);
ObjectSet(name,OBJPROP_COLOR,theColor);
ObjectSet(name,OBJPROP_TIME1,time);
ObjectSetText(name,text,fontsize,"Arial bold");

}


 

Please someone?.....

 

Did you still need this done?

Reason: