Draws a Horizontal Line at Session Open: On the hour (09:00, 15:00 etc) or any minute past the hour (9:30, 18:47 etc)
Daily_Open_Line mod-x is a modification of the Daily_Open_Line indicator - Original Author: Midnite
The original indicator has input for a start time on the hour (9:00, 11:00, 15:00 etc) but not past the hour (09:30, 15:15 etc). See here for original indicator.
Unable to find a version accommodating a start time past the hour, rather than reinvent the wheel, I have added some edits.
The usual parameters of line color, thickness & style apply.
EUR-USD: US Open 9:30 Eastern Time @ 2012-Jun-04
Note: If you are checking the historical candles.....
Please be aware of below:
Been messing with this and the minute feature doesn't work to an extent as MT4 will move any line to the nearest candle open, when ever on a higher TF. Limitation of the orignal code maybe - SetIndexStyle(0,DRAW_LINE);
The minute feature works within the limits of mathematical possibilty. The indicator starts the H-Line at the open of the candle that corresponds to the minute setting-parameter.
On a M5 timeframe a time of 08:05 will start the H-Line at the open of the 08:05 - 08:10 candle and on a M30 timeframe a time of 08:30 will start the H-Line at the open 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. So a minute parameter of 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.
Within the scope of present code valid hour and minute settings-parameters are as follows:
Opening trades directly from charts;Snowies EA with 3 indicators
Take a look at my EA using the 3 indicators.