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); }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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...