Alert on certain levels

To add comments, please log in or register
dowrich
15
dowrich  

Hi all, i'm trying to add alert to an indicator, but only on certain levels:

if (Extend_Line) {
      for(i = 0; i < Maxbar; i++) {
         if (UpBuffer[i] > 0) {
            level = UpBuffer[i];
            for (c = i; c > 0; c--) { 
               if ((Open[c] > level && Close[c] < level)){ //Cancel Level                  
                  DrawLine ("H", i, c, level, Extend_Line_to_Background, Up_Fractal_Extend_Line_Color, Up_Fractal_Extend_Width, Up_Fractal_Extend_Style); 
                  if (Show_Validation_Candle) UpBuffer[i-2*dif] = level;
                  i += dif; 
                //(Low[c] <= level && Close[c] > level && Open[c] > level) || (Low[c] <= level && Open[c] > level && Close[c] > level && Ask > Open[c] - Alert Condition
               }
            }       
         }
      }

Basically I want to be alerted on Alert Condition, but on levels which are not canceled according to Cancel Level. Any help will be appreciated.

To add comments, please log in or register