this is what I do :
if (MathAbs(CurTime()-LastUpdate)> UpdateInterval*60) // we update the first time it is called and every UpdateInterval minutes
{
LastUpdate = CurTime();
... etc
LastUpdate is initialised to zero so the script is exectued a first time, then it waits UpdateInterval minutes.
Hope it helps,
if (MathAbs(CurTime()-LastUpdate)> UpdateInterval*60) // we update the first time it is called and every UpdateInterval minutes
{
LastUpdate = CurTime();
... etc
LastUpdate is initialised to zero so the script is exectued a first time, then it waits UpdateInterval minutes.
Hope it helps,
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
if CurTime - LastTradeTime < 300 Then Exit;
Any idea how to do it in MT4?
TIA.