Call a function every 6 minutes in a 1 Hour TimeFrame EA

 
How do i call a function in an EA that runs on H1 timeframe. Since the Start() or OnStart() runs once per H1 Bar but I want to call the below function every 6 minutes  . Using OnTick() does not work for me , i don't want to call it on every tick. Just every 6 minutes   . Any help will be welll appreciated .    


     void myEverySixMinutes()

  {

      //Reset functionCalled boolean

      if(MathMod(Minute(),6)) {

         functionCalled = false;

      }

            

      if(functionCalled == false) {

         if(MathMod(Minute(),6)) {

             

         }

         else {

            // refresh the market info

            Log("Random Timer: = ", 6);

            RefreshRates();

                        

            Dosomethingfunction();

                      

            //Stop Function being called again

            functionCalled = true;

 

         }

      }

       

  }

 

Please use the </> button to post your code.


 
Network Guru:
How do i call a function in an EA that runs on H1 timeframe. Since the Start() or OnStart() runs once per H1 Bar but I want to call the below function every 6 minutes  . Using OnTick() does not work for me , i don't want to call it on every tick. Just every 6 minutes   . Any help will be welll appreciated .    

What about OnTimer() ?