Home Technical Indicator Post

Mastering the Session Open H-Line Indicator for MT4

Attachments
10754.zip (1.13 KB, Download 0 times)

Ever found yourself wishing for a Horizontal Line to mark the Session Open on your MetaTrader 4? Well, you’re in luck! This handy tool draws a line at the start of each trading session, whether it’s right on the hour (like 09:00 or 15:00) or at any minute past the hour (think 9:30 or 18:47).

Introducing the Daily_Open_Line mod-x, an enhanced version of the original Daily_Open_Line indicator created by Midnite. This modification allows for a more flexible input, letting you specify not just the hour but also exact minutes after the hour.

While the original version set a start time on the hour (like 9:00, 11:00, or 15:00), it didn’t accommodate times like 09:30 or 15:15. You can check out the original indicator here.

What’s New?

  • Input the exact minute you want to start the session line (like 9:30, 10:42, or 14:56).
  • Set limits: hours can be up to 23 and minutes up to 59.

Plus, you can customize the usual parameters like line color, thickness, and style to fit your trading setup.

Example: EUR-USD US Open 9:30 Eastern Time @ 2012-Jun-04

Note: If you’re looking back at historical candles, here’s what to keep in mind:

  • The candles shown in the chart above are generated from range bars (RB) set at 5 pips, which means they might look different from the standard historical candles.
  • Each of these range candles covers exactly 5 pips from low to high.

Important Reminder:

After tinkering with the minute feature, it’s worth noting that MT4 tends to move the line to the nearest candle open when viewed on a higher timeframe. This seems to be a limitation of the original code.

The minute feature operates within the mathematical limits of the code. For instance, if you set a time of 08:05 on an M5 timeframe, the H-Line starts at the open of the 08:05 - 08:10 candle. However, if you set a time of 08:07, the indicator won’t find a candle open at that exact time, skipping 08:05 - 08:10 and starting the H-Line at the next available candle open, which is 08:10 - 08:15. So, setting a time like xx:07 is effectively invalid. The same applies to a time of 02:00 on an H4 timeframe, as the candle only opens at 00:00 - 04:00.

Valid Settings:

  • M1: All minutes past the hour: xx:00 - xx:59
  • M5: xx:00, xx:05, xx:15, xx:30
  • M15: xx:00, xx:15, xx:30
  • M30: xx:00, xx:30
  • H1: 00:00 - 23:00 (only on the hour)
  • H4: 00:00, 04:00, 08:00, 12:00, 16:00 & 20:00

Related Posts

Comments (0)