mrchuckw:
55839 - in this post, I learned how to open an order at the start of a bar. Am using this with great success.
What I need to know now, is how to delay opening the order for X no. of minutes after the opening of the bar.
Example: On the 4 hour chart, open an order at the opening of the 4 hour bar + 5 minutes ( or 10 minutes, etc.,)
Any help is greatly appreciated.
MrChuckW
Datetime is an integer representing number of seconds elapse since January 1, 1970 00:00:00.
So for example, 3 minutes after January 1, 1970 00:00:00 is equal with integer value of 180 (3 minutes * 60 second).
So, the solution will be,,,
int one_minute = 60; if (TimeCurrent() >= iTime (Symbol(), PERIOD_H4, 0) + 5*one_minute) { //--- open now }

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
55839 - in this post, I learned how to open an order at the start of a bar. Am using this with great success.
What I need to know now, is how to delay opening the order for X no. of minutes after the opening of the bar.
Example: On the 4 hour chart, open an order at the opening of the 4 hour bar + 5 minutes ( or 10 minutes, etc.,)
Any help is greatly appreciated.
MrChuckW