signaltable changed, not working

 

Hello fellow traders,

i found the signaltbale indicator on this site, and wanted to modify the SAR,WPR and MA into something different. But somehow (i only changed the "if" parts) its not working. Who can help me with the solution for this?

The original: https://www.mql5.com/en/code/8179

This is what i have now :

//////////////////////////////////////////////////////////////////////
//
//                                                  signalTable.mq4 
//                                                     Antonuk Oleg 
//                                            antonukoleg@gmail.com 
//
//////////////////////////////////////////////////////////////////////
#property copyright "Antonuk Oleg"
#property link      "antonukoleg@gmail.com"

#property indicator_chart_window

extern int scaleX=20,
           scaleY=20,
           offsetX=35,
           offsetY=20,
           fontSize=20,
           corner=2,
           symbolCodeBuy=67, 
           symbolCodeSell=68, 
           symbolCodeNoSignal=73; 
           
extern color signalBuyColor=Gold,
             signalSellColor=MediumPurple,
             noSignalColor=WhiteSmoke,
             textColor=Gold;            
            
int period[]={1,5,15,30,60,240,1440,10080,43200};  
string periodString[]={"M1","M5","M15","M30","H1","H4","D1","W1","MN1"},signalNameString[]={"ATR","SMA","RGB"};

//++++ These are adjusted for 5 digit brokers.
double  pips2points,    // slippage  3 pips    3=points    30=points
        pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)

//////////////////////////////////////////////////////////////////////
//
// init()          
//
//////////////////////////////////////////////////////////////////////
int init()
{
   for(int x=0;x<9;x++)
      for(int y=0;y<3;y++)
      {
         ObjectCreate("signal"+x+y,OBJ_LABEL,0,0,0,0,0);
         ObjectSet("signal"+x+y,OBJPROP_CORNER,corner);
         ObjectSet("signal"+x+y,OBJPROP_XDISTANCE,x*scaleX+offsetX);
         ObjectSet("signal"+x+y,OBJPROP_YDISTANCE,y*scaleY+20);
         ObjectSetText("signal"+x+y,CharToStr(symbolCodeNoSignal),
                       fontSize,"Wingdings",noSignalColor);
      }
  
  for(x=0;x<9;x++)
  {
      ObjectCreate("textPeriod"+x,OBJ_LABEL,0,0,0,0,0);   
      ObjectSet("textPeriod"+x,OBJPROP_CORNER,corner);
      ObjectSet("textPeriod"+x,OBJPROP_XDISTANCE,x*scaleX+offsetX);
      ObjectSet("textPeriod"+x,OBJPROP_YDISTANCE,offsetY-10);
      ObjectSetText("textPeriod"+x,periodString[x],8,"Tahoma",textColor);
  }
  
  for(y=0;y<3;y++)
  {
      ObjectCreate("textSignal"+y,OBJ_LABEL,0,0,0,0,0);   
      ObjectSet("textSignal"+y,OBJPROP_CORNER,corner);
      ObjectSet("textSignal"+y,OBJPROP_XDISTANCE,offsetX-25);
      ObjectSet("textSignal"+y,OBJPROP_YDISTANCE,y*(scaleY)+offsetY+8);
      ObjectSetText("textSignal"+y,signalNameString[y],8,"Tahoma",textColor);      
  }
  return(0);
}
  
int start()
{
   if (Digits == 5 || Digits == 3)
   {    // Adjust for five (5) digit brokers.
               pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
   } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0;

   for(int x=0;x<9;x++)
   {
      if(High[iHighest(NULL,period[x],MODE_HIGH,5,1)]-Low[iLowest(NULL,period[x],MODE_LOW,5,1)]/pips2dbl<(iATR(NULL,period[x],20,1)/pips2dbl)*1.5)
         ObjectSetText("signal"+x+"0",CharToStr(symbolCodeBuy),fontSize,"Wingdings",signalBuyColor);
      else
         ObjectSetText("signal"+x+"0",CharToStr(symbolCodeNoSignal),fontSize,"Wingdings",noSignalColor);   
   }

   for(x=0;x<9;x++)
   {
      if(iClose(NULL,period[x],1)>iMA(Symbol(),period[x],20,0,MODE_SMA,PRICE_CLOSE,1)||iMA(Symbol(),period[x],40,0,MODE_SMA,PRICE_CLOSE,1))
         ObjectSetText("signal"+x+"1",CharToStr(symbolCodeBuy),fontSize,"Wingdings",signalBuyColor);
      else
         ObjectSetText("signal"+x+"1",CharToStr(symbolCodeNoSignal),fontSize,"Wingdings",noSignalColor);   
   }
   
   for(x=0;x<9;x++)
   {
      if(iClose(NULL,period[x],1)>iMA(NULL,period[x],34,0,MODE_EMA,PRICE_CLOSE,1))
         ObjectSetText("signal"+x+"2",CharToStr(symbolCodeBuy),fontSize,"Wingdings",signalBuyColor);
      else   
         ObjectSetText("signal"+x+"2",CharToStr(symbolCodeSell),fontSize,"Wingdings",signalSellColor);
   }
   return(0);
}

//////////////////////////////////////////////////////////////////////
//
//  deinit()                       
//
//////////////////////////////////////////////////////////////////////
int deinit()
{
   ObjectsDeleteAll();
   return(0);
}