Estoy quiero poder ver señales de temparalidad 5minutos en grafico de un minuto

 

buenas quisiera tener señales fijas en velas de de 5min y a su vez se visualizaran en el chart de 1minuto sin que se cambien las flechas de las señales de 5 minutos, acontinuacion tengo señales que valiran de acuerdo a la temporalidad que me muestre el chart asi que no se como hacer porqur cambio el periondo "PERIOD_CURRENT" por el PERIOD_m5 pero solo visualizan señales en el chart de 5m al pasar al chart de 1minuto se pierden las señales de 5min. envio codigo :

#property copyright "Created with EABuilder.com"

#property link      "https://eabuilder.com"

#property version   "1.00"

#property description ""


//--- indicator settings

#property indicator_chart_window

#property indicator_buffers 4

#property indicator_plots 4


#property indicator_type1 DRAW_ARROW

#property indicator_width1 5

#property indicator_color1 Yellow

#property indicator_label1 "Señal1"

#property indicator_type2 DRAW_ARROW

#property indicator_width2 5

#property indicator_color2 White

#property indicator_label2 "Señal2"



#property indicator_type3 DRAW_ARROW

#property indicator_width3 5

#property indicator_color3 Magenta

#property indicator_label3 "Señal3"


#property indicator_type4 DRAW_ARROW

#property indicator_width4 5

#property indicator_color4 White

#property indicator_label4 "Señal4"



//--- indicator buffers

double Buffer1[];

double Buffer2[];

double Buffer3[];

double Buffer4[];




input bool UseAlerts = true;

datetime time_alert; //used when sending alert

bool Audible_Alerts = true;

double myPoint; //initialized in OnInit

double Open[];

double Close[];

double Low[];

double High[];


int ADXW_handle;

double PADXW[];

double NADXW[];

double ADXW[];


int MA_handle100;

double MA100[];


//---

int StartBars;


//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

void myAlert(string type, string message)

  {

   if(type == "print")

      Print(message);

   else

      if(type == "error")

        {

         Print(type+" | Velas @ "+Symbol()+","+IntegerToString(Period())+" | "+message);

        }

      else

         if(type == "order")

           {

           }

         else

            if(type == "modify")

              {

              }

            else

               if(type == "indicator")

                 {

                  Print(type+" | Velas @ "+Symbol()+","+IntegerToString(Period())+" | "+message);

                  if(Audible_Alerts)

                     Alert(type+" | Velas @ "+Symbol()+","+IntegerToString(Period())+" | "+message);

                 }

  }


int OnInit()

  {

   SetIndexBuffer(0, Buffer1);

   PlotIndexSetDouble(0, PLOT_EMPTY_VALUE, EMPTY_VALUE);

   PlotIndexSetInteger(0, PLOT_ARROW, 226);

   PlotIndexSetInteger(0,PLOT_ARROW_SHIFT,-25);

   SetIndexBuffer(1, Buffer2);

   PlotIndexSetDouble(1, PLOT_EMPTY_VALUE, EMPTY_VALUE);

   PlotIndexSetInteger(1, PLOT_ARROW, 225);

   PlotIndexSetInteger(1,PLOT_ARROW_SHIFT,30); // señal flecha baja Low


   SetIndexBuffer(2, Buffer3);

   PlotIndexSetDouble(2, PLOT_EMPTY_VALUE, EMPTY_VALUE);

   PlotIndexSetInteger(2, PLOT_ARROW, 250);

   PlotIndexSetInteger(2,PLOT_ARROW_SHIFT,-30);

   SetIndexBuffer(3, Buffer4);

   PlotIndexSetDouble(3, PLOT_EMPTY_VALUE, EMPTY_VALUE);

   PlotIndexSetInteger(3, PLOT_ARROW, 250);

   PlotIndexSetInteger(3,PLOT_ARROW_SHIFT,30);//señal confirmacion Cuadro Low

   

   

   myPoint = Point();

   if(Digits() == 6 || Digits() == 2)

     {

      myPoint *= 10;

     }

     

       MA_handle100 = iMA(NULL, PERIOD_CURRENT, 150, 0, MODE_SMA, PRICE_CLOSE);

   if(MA_handle100 < 0)

     {

      Print("The creation of iMA has failed: MA_handle=", INVALID_HANDLE);

      Print("Runtime error = ", GetLastError());

      return(INIT_FAILED);

     }

     

   ADXW_handle = iADXWilder(NULL, PERIOD_CURRENT, 14);

   if(ADXW_handle < 0)

     {

      Print("The creation of iBands has failed: ADXW_handle=", INVALID_HANDLE);

      Print("Runtime error = ", GetLastError());

      return(INIT_FAILED);

     }

   

   

   return(INIT_SUCCEEDED);

  }



//+------------------------------------------------------------------+

//| Custom indicator iteration function                              |

//+------------------------------------------------------------------+

int OnCalculate(const int rates_total,

                const int prev_calculated,

                const datetime& time[],

                const double& open[],

                const double& high[],

                const double& low[],

                const double& close[],

                const long& tick_volume[],

                const long& volume[],

                const int& spread[])

  {

  int limit = rates_total - prev_calculated;

  //--- counting from 0 to rates_total

   ArraySetAsSeries(Buffer1, true);

   ArraySetAsSeries(Buffer2, true);

   ArraySetAsSeries(Buffer3, true);

   ArraySetAsSeries(Buffer4, true);


//--- initial zero



   if(prev_calculated < 1)

     {

      ArrayInitialize(Buffer1, 0);

      ArrayInitialize(Buffer2, 0);

      ArrayInitialize(Buffer3, 0);

      ArrayInitialize(Buffer4, 0);

     

     

     }

   else

      limit++;

   datetime Time[];


   if(CopyOpen(Symbol(), PERIOD_CURRENT, 0, rates_total, Open) <= 0)

      return(rates_total);

   ArraySetAsSeries(Open, true);

   if(CopyClose(Symbol(), PERIOD_CURRENT, 0, rates_total, Close) <= 0)

      return(rates_total);

   ArraySetAsSeries(Close, true);

   if(CopyLow(Symbol(), PERIOD_CURRENT, 0, rates_total, Low) <= 0)

      return(rates_total);

   ArraySetAsSeries(Low, true);

   if(CopyHigh(Symbol(), PERIOD_CURRENT, 0, rates_total, High) <= 0)

      return(rates_total);

   ArraySetAsSeries(High, true);

   if(CopyTime(Symbol(), Period(), 0, rates_total, Time) <= 0)

      return(rates_total);

   ArraySetAsSeries(Time, true);


  

   if(CopyBuffer(ADXW_handle,0,0,rates_total, ADXW) <= 0)

      return(rates_total);

   ArraySetAsSeries(ADXW, true);

   if(BarsCalculated(ADXW_handle) <= 0)

      return(0);


   if(CopyBuffer(ADXW_handle,1,0,rates_total, PADXW) <= 0)

      return(rates_total);

   ArraySetAsSeries(PADXW, true);



   if(CopyBuffer(ADXW_handle,2,0,rates_total, NADXW) <= 0)

      return(rates_total);

   ArraySetAsSeries(NADXW, true);

if(BarsCalculated(MA_handle100) <= 0)

      return(0);

   if(CopyBuffer(MA_handle100, 0, 0, rates_total, MA100) <= 0)

      return(rates_total);

   ArraySetAsSeries(MA100, true);

     

  

   for(int i = limit-1; i >= 0; i--)

     {

      if(i >= MathMin(5000-1, rates_total-1-50))

         continue; //omit some old rates to prevent "Array out of range" or slow calculatio

         

         if(PADXW[i]>NADXW[i] && PADXW[i+1]<NADXW[i+1]

        && Open[i]>MA100[i] && Close[i]>MA100[i]

         ){

         Buffer4[i]=Low[i];

         if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "Cambio de ADX"); time_alert = Time[0]; }

         

         

         

         }

         else

         {

         Buffer4[i]=EMPTY_VALUE;

         }

         

          if(ADXW[i]>25 && ADXW[i+1]<25

         ){

         Buffer2[i]=Low[i];

         if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "ADXXXXX"); time_alert = Time[0]; }

         

         

         }

         else

         {

         Buffer2[i]=EMPTY_VALUE;

         }

         

          if(PADXW[i]<NADXW[i] && PADXW[i+1]>NADXW[i+1]

          && Open[i]<MA100[i] && Close[i]<MA100[i]

         ){

         if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "Cambio de ADX"); time_alert = Time[0]; }

         Buffer3[i]=High[i];

         

         

         

         }

         else

         {

         Buffer3[i]=EMPTY_VALUE;

         }

         

          if(ADXW[i]>25 && ADXW[i+1]<25

         ){

         Buffer1[i]=High[i];

         if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "ADXXX"); time_alert = Time[0]; }

         

         

         }

         else

         {

         Buffer1[i]=EMPTY_VALUE;

         }

     }    

   return(rates_total);

  }