Session Opening H Line - MetaTrader 4 Script | Forex Indicator Download - MT4/MT5 Resources




Draw a Horizontal Line Meeting opening times: on the hour (09:00, 15:00, etc.) or any minute after the hour (9:30, 18:47, etc.)
Daily_Open_Line mod-x is a modified version of the Daily_Open_Line indicator - Original author: Midnight
The original indicator has entered a start time at a time (9:00, 11:00, 15:00, etc.), but not a time in the past (09:30, 15:15, etc.). See here for the original indicator.
Since I couldn't find a version that accommodated a start time an hour later, I didn't reinvent the wheel but added a few edits.
Apply common parameters such as line color, thickness, and style.
EURUSD: 9:30 ET @ June 4, 2012
Notes: If you are checking historical candles...
Please note the following:
To mess this up, the minute function doesn't work to an extent as MT4 will move any line to the nearest candle open as long as the TF is higher. The limitation of the original code might be - SetIndexStyle(0,DRAW_LINE);
Tiny features work within the bounds of mathematical possibility. The indicator starts H-line at the opening of the candle corresponding to the minute setting parameters.
On the M5 time frame, the time of 08:05 will initiate the H line at the opening of the 08:05 - 08:10 candle, while on the M30 time frame, the time of 08:30 will initiate the H line at the opening of the 08:30 - 09:00 candle.
If a time of 08:07 is set on a M5 timeframe the indicator will not find a candle open at 08:07 and will skips the 08:05 - 08:10 candle and starts the H-Line at the next available candle open, 08:10 - 08:15. Therefore, the minute parameter xx.07 is meaningless and invalid. Likewise a time of 02:00 on a H4 timeframe is meaningless and invalid as the candle start and end time is 00:00 - 04:00.
The hour and minute setting parameters valid within the current code range are as follows:
Attachment download
📎 Daily_Open_Line_mod-x.mq4 (3.02 KB)
Source: MQL5 #10754
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •