MQL4 - automated forex trading   /  

Forum

Function Req, next bar is open after trade

Back to topics list To post a new topic, please log in or register

avatar
74
icm63 2007.10.11 21:04 

Chart time frame : H1

I have a trade opened at 16:20 ( of course it can be anytime, like 16:30, 16:55) within a current H1 bar.

I want to run a indicator check when the next hourly bar starts , say at 17:05 or greater

Like if(TimeCurrent() > "17:05")

- So I need to find the seconds diff btw 16:30 and 17:05, no knowing what 16:30 will be each time as its based on trade execution time.

How do I determine the next hour start time, no matter when trade time opens, and taking into account 23:00 rolls over to 00:00 ???

article

30 Days of Registration

30 days have passed since Registration started. Almost 650 people have already applied for participation. This is practically equal to the total amount of applications in Championship 2006. There are still 52 days left until Registration is over.


avatar
2462
phy 2007.10.11 21:49 

secondsUntilNextBar = Period()*60 - MathMod(TimeCurrent, Period()*60);

Back to topics list  

To add comments, please log in or register