Daily Opening line indicator

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
Is there daily opening line indicator for MT5? couldn't find in code base. anyone willing to code one?

Thank you
 

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
I am looking for something like this , as attached MT4 version, in MT5 version. indicator draw Horizontal line at start of trading day till at opening price level.
Thank you
 

Attachments

  • daily_open_line.mq4
    2.4 KB · Views: 74

matfx

Active Trader
Its been converted already.

usdjpy-m30-alpari-international-limited.png
 

Attachments

  • Daily open line.mq5
    1.2 KB · Views: 51
  • Like
Reactions: Enivid

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
Thank you very much. There is problem: why are lines connected? It should be like on your picture.EURUSDH1-Daily Open.png
 

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
Mr. Enivid,
horizontal lines should not be connected. would you be willing to fix it please?
thank you
 

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
I did and dots are huge, ugly. I am sure must be better solution by modifying code by removing connection between lines. Original MT4 version has no such issue. It is DRAW_ LINE...
 

Enivid

Administrator
Staff member
Nov 30, 2008
15,219
697
144
Odessa
www.earnforex.com
You can add PlotIndexSetInteger(0, PLOT_ARROW, 158); after SetIndexBuffer(0,openLine,INDICATOR_DATA); to reduce the size of the dots. Otherwise, if you want to keep lines, you have to skip the first (or last) bar in the day to break the line as they do it in the MT4 version.
 

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
hello Enivid,
indicator print for 1 bar less than expected. for example it prints for 5 bars on H4 instead 6.
would you be willing to add for other time frames besides daily and some other modifications ?
 

Attachments

  • DAILY OPEN LINE-3.png
    DAILY OPEN LINE-3.png
    50.3 KB · Views: 43

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
sorry i was wrong, originally long time ago uploaded indicator is same like you made, same problem...There is indicator that print correctly: H4=6 bars and H1 =24 bars. problem with this indicator is that print for weekly :friday to friday; see attached please.

then saw another one: has weekly correct but H4 , H1 etc incorrect...

sincerely
 

Attachments

  • Open levels nmc.ex4
    48.5 KB · Views: 21

ruma29

Master Trader
Nov 12, 2016
58
4
49
54
Enivid, on monthly chart shows weekly opening line but should not and it is randomly placed.Does weekly and monthly need to have "Time shift(in hours)" like in Daily opening line?
I need yearly opening line as well for MT4 and MT5. Thank you.
 

Attachments

  • EURUSDMonthly-WEEKLY OPEN LINE.png
    EURUSDMonthly-WEEKLY OPEN LINE.png
    518.3 KB · Views: 39