Why is my function returning 0? - page 2

 

there are some issues -apart from data handling- ,in the broom() function

         if(iHigh(NULL,PERIOD_M15, d) == iHigh(NULL,PERIOD_M30, 1))
         {
            if(iLowest(NULL,PERIOD_M15,MODE_LOW,3,d) == d)

should be : 

         if(iHigh(NULL,PERIOD_M15, d) == iHigh(NULL,PERIOD_M30, 1))
         {
          if(iHighest(NULL,PERIOD_M15,MODE_HIGH,3,d) == d)

then in the swing function the highs check is reversed 

            if((iHigh(NULL,PERIOD_M15,f) - iHigh(NULL,PERIOD_M15,broom())) >= 0.00010)
            {
               if((iHigh(NULL,PERIOD_M15,f) - iHigh(NULL,PERIOD_M15,broom())) <= 0.00100)
               {
                  if(iHigh(NULL,PERIOD_M15,f) < iHigh(NULL,PERIOD_M15,f+1) && iHigh(NULL,PERIOD_M15,f) < iHigh(NULL,PERIOD_M15,f+2))

should be : 

            if((iHigh(NULL,PERIOD_M15,f) - iHigh(NULL,PERIOD_M15,broom())) >= 0.00010)
            {
               if((iHigh(NULL,PERIOD_M15,f) - iHigh(NULL,PERIOD_M15,broom())) <= 0.00100)
               {
                  if(iHigh(NULL,PERIOD_M15,f) > iHigh(NULL,PERIOD_M15,f+1) && iHigh(NULL,PERIOD_M15,f) > iHigh(NULL,PERIOD_M15,f+2))
 
Lorentzos Roussos:

there are some issues -apart from data handling- ,in the broom() function

should be : 

then in the swing function the highs check is reversed 

should be : 

Thank you for your corrections.

What data handling mistakes am I making? I cannot work it out for the life of me.

 
Harry Wright:

Thank you for your corrections.

What data handling mistakes am I making? I cannot work it out for the life of me.

The calls to i functions ,you dont know if they actually return data .

If they return data you dont know if its "fundamentally proper"

Is this for an indicator or an expert ? 

And also , what are you trying to do ?