Hola, estoy probando ha hacer cositas manipulando un indicador mq4, se algo de c pero se me esta haciendo complicado, os queria preguntar a ver si podriais ayudar.

El caso es que el indicador lo que hacer es segun las ondas de elliot pone imprime en el grafico una flecha hacia arriba y otra hacia abajo, la cosa es que me gustaria que en el momento en el que la imprima me muestre una alerta en la pantalla. Aparente parece facil pero no doy con la forma a ver si podeis ayudar, he conseguido que segun el buffer me vaya imprimiendo la ultima que me ha mostrado pero no quiero eso.

os pongo el código q no es mucho, porque no se como subir el archivo.

Un saludo y a ver si es posible o no hacerlo.

Código:
#property copyright "tonyc2a@yahoo.com"#property link      ""


#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue


extern int Fast.MA.Period = 5;
extern int Slow.MA.Period = 34;
extern int  Signal.period        = 5;


//---- buffers
double      Buffer1[],
            Buffer2[],
            b2[],
            b3[];
extern int x;            
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators


// two additional buffers used for counting


   IndicatorBuffers(4);
        
   
   IndicatorShortName("Elliott_Arrow");
   
   SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
   SetIndexArrow(0,234);  // down  226 234  242
   SetIndexBuffer(0,b2);
   SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
   SetIndexArrow(1,233);   //UP   225  233 241
   SetIndexBuffer(1,b3);
   
// These buffers are not plotted, just used to determine arrows


   SetIndexBuffer (2,Buffer1);
   SetIndexBuffer (3,Buffer2);
   //Alert(b2);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
    
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    i, counted_bars=IndicatorCounted();
   double MA5,MA34;
   int limit=Bars-counted_bars;
   Print(" print limit = ", limit);
   if(counted_bars>0) limit++;
//---- TODO: add your code here
   
// Main line
   for(i=0; i<limit; i++)
   {
      MA5=iMA(NULL,0,Fast.MA.Period,0,MODE_SMA,PRICE_MEDIAN,i);
      MA34=iMA(NULL,0,Slow.MA.Period,0,MODE_SMA,PRICE_MEDIAN,i);
      
      Buffer1[i]=MA5-MA34;
    }       


// Signal line


  for(i=0; i<limit; i++)
   {
      Buffer2[i]=iMAOnArray(Buffer1,Bars,Signal.period,0,MODE_LWMA,i);
   }
      
// Arrows


   for(i=0; i<limit; i++)
   {
         if(Buffer1[i] > Buffer2[i] && Buffer1[i-1] < Buffer2[i-1]){
               b2[i] = High[i]+10*Point; 
               }     
         if(Buffer1[i] < Buffer2[i] && Buffer1[i-1] > Buffer2[i-1]){
               b3[i] = Low[i]-10*Point; 
               }
   }
   return(0);
  }
Foro de Forex Trading United