Somsri Sarkar: is there any way to make time gap of 15 minutes from the current time after the condition satisfies?
| Just do it. TimeCurrent - Date and Time - MQL4 Reference |
if(TimeCurrent() >= TimeStamp && some conditions)
{
Alert
TimeStamp = TimeCurrent() + 900; // 15 minutes == 900 seconds
}
if(TimeCurrent() >= TimeStamp && some conditions)
{
Alert
TimeStamp = TimeCurrent() + 900; // 15 minutes == 900 seconds
}
Hi, Thank you it worked!
Somsri Sarkar: Hi, Thank you it worked!
|
|
|
I doubt the OP will be back to ask how they can adjust their alert for 5 minutes (if they are, you will have my apologies).
Therefore the OP most likely has learned something.
I gave them a tool. You gave them instructions on how to make a tool.
|
And how many people never posted again, or gave up completely?
honest_knave: And how many people never posted again, or gave up completely?
| If there are any, they really didn't want to succeed at FX, and were just wasting everyone's time. I try to treat everyone here as an adult. If they act like an adult, I will try to help. If they just want a freebe, or start whining when they don't get it, then they need to grow up. They've wasted our time with their post, so they don't deserve niceness. |
The OP concisely explained their problem, posted an attempt at coding it themselves, and was generally polite and courteous. I don't see the issue.
I think we'll have to respectfully agree to disagree on this one.
honest_knave: The OP concisely explained their problem, posted an attempt at coding it themselves, and was generally polite and courteous. I don't see the issue.
| Yes he did. I didn't comment on him, I commented on you. I gave you something to think about and three times you had to get the last word in. You are the issue. |

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
I have following code for adding time gaps between alerts, otherwise tick by tick it creates many continuous alerts.
if(TimeStamp != iTime(Symbol(),PERIOD_M15,0) && some conditions)
{
Alert
TimeStamp = iTime(Symbol(),PERIOD_M15,0);
}
But in this code, when then a condition satisfies at 11:14 on next time it show alert at 11:15 because code it used 15 minute time gap.
Is there any way to make time gap of 15 minutes from the current time after the condition satisfies?
Thank you in advance.
Regards