Alert Trigger Only Once
Hey, I've been wondering, why did you put your iStochastic symbol in a loop (pair [k])?
any reason for it?
iStochastic(pair[k],PERIOD_M15,3,1,4,MODE_EMA,(int)sto_price,MODE_MAIN,i+1)>90.0
I'm afraid after your indicator has triggered the alert for current symbol, it was prepared to trigger for symbol next to it.
Why don't you use NULL? like this
iStochastic(NULL,PERIOD_M15,3,1,4,MODE_EMA,(int)sto_price,MODE_MAIN,i+1)>90.0
Hey, I've been wondering, why did you put your iStochastic symbol in a loop (pair [k])?
any reason for it?
I'm afraid after your indicator has triggered the alert for current symbol, it was prepared to trigger for symbol next to it.
Why don't you use NULL? like this
At some point you want to clear the alert array, presumably before the k and j loops.
Try putting this before the for(k) loop.
ArrayInitialize(array,false);
Hi.. need someone to rectify the issues i'm having..
The alert is all working fine... But if the next bar have the same rules, the alert won't appear again as previously it has already appear.. which means the alert only trigger once
this the top part of it..
{ int i=0,j=0; ArrayResize(mess_data,NumPair+1,20); ArrayResize(mess_color,NumPair+1,20); ArrayResize(alert,NumPair+1,20); //--- for(int k=0;k<NumPair;k++) { for(j=0;j<tf_desk;j++) { if( iStochastic(pair[k],PERIOD_M15,3,1,4,MODE_EMA,(int)sto_price,MODE_MAIN,i+1)>90.0 && iStochastic(pair[k],PERIOD_M15,3,1,4,MODE_EMA,(int)sto_price,MODE_SIGNAL,i+1)>90.0 && iStochastic(pair[k],PERIOD_M1,3,1,4,MODE_EMA,(int)sto_price,MODE_MAIN,i+1)>50.0 && iStochastic(pair[k],PERIOD_M1,3,1,4,MODE_EMA,(int)sto_price,MODE_SIGNAL,i+1)>50.0 ) {mess_data[k][j]="S";mess_color[k][j]=clrRed; if(k>0 && ALERT && !alert[k][j]) { SendNotification(pair[k] + " " + "BANK SCALPER M1 SIGNAL SELL" + " " + "DATE :" + " " + TimeToStr(TimeLocal(),TIME_DATE) + " " + "TIME :" + " " + TimeToStr(TimeLocal(),TIME_MINUTES)); alert[k][j]=true; } } else {mess_data[k][j]="X";mess_color[k][j]=clrGray;} } } }This the rules....