How to automatically set "integer value" to "zero" in every 15 minutes?

 

Hi...i'm trying to writer a program that needed to reset the "int" value to "0" quarterly...

Can anyone guide me to set "integer value" to "0" in every 15 minutes???

Any suggestion will be deeply appreciated...

 
if (iVolume("EURUSD", PERIOD_M15, 0) <= 1){
  liMyInt = 0;
}
hth
 

Don't use volume. it is unreliable. A new bar can have volume greater than one.

start() {         static datetime Time_P_M15;
if (TimeCurrent() > Time_P_M15) { Time_P_M15 =TimeCurrent() + 15*60;
   liMyInt = 0;
}
If you are running on a 15 minute chart and you want to do something at start of a new bar:
int start() {                       static datetime Time0;
   bool newBar = Time[0] > Time0;   if (newBar) {   Time0 = Time[0];
   //...
   }
   return(0);
}
Reason: