Function for one result per day

 
Hi prosfessional,
I just need to get one result per day
But the result changes with condition change through the day and expert restart so please advise.thank you


double testopenabove3(bool x,int y,int z)

  {

   if(TimeDay(Time[0]) !=  candletime)
     {
      if(x== true)
        {

         if(y >= 9)

            return (1);
         candletime = (TimeDay(Time[0]));
         if((z <= 2))

            return (0);

         candletime = (TimeDay(Time[0]));

        }
      return (5);
     }
   return (10);

  }
 
Please edit your post and use the code button (Alt+S) when pasting code.
EDIT your original post, please do not just post the code correctly in a new post.

Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
Reason: