MT5.DrawHorizontalLine.Rd
Draw horizontal line into MT5 chart(s).
MT5.DrawHorizontalLine( sSymbol, fPrice, iWidth = 1, iColor = 1, sName = "", iTF = 0 )
sSymbol | character; target symbol. |
---|---|
fPrice | numeric; at which price will be draw the line. |
iWidth | int; which width will be draw the line (default |
iColor | int; See details (default |
sName | character; unique name if you want further modifications in lines parameters. |
iTF | int; its always in minutes. If |
Returns TRUE
if the line was drawn, FALSE
otherwise.
Supported colors (iColor
). See url below for even more details.
1: clrGreen (GREEN)
2: clrBlue (BLUE)
3: clrRed (RED)
4: clrNavy
5: clrPurple
6: clrIndigo
7: clrOliveDrab
8: clrDarkSlateBlue
9: clrLawnGreen
10: clrOrangeRed
11: clrGold
12: clrYellow
13: clrAqua
14: clrMagenta
15: clrLightSlateGray
16: clrPaleVioletRed
17: clrHotPink
18: clrKhaki
19: clrSilver
20: clrLightGray
21: clrKhaki
22: clrBeige
https://www.mql5.com/en/docs/constants/objectconstants/webcolors
Supported time frames (iTF
). See url below for even more details.
0: all (it will be draw on all time frames)
1: PERIOD_M1
2: PERIOD_M2
5: PERIOD_M5
15: PERIOD_M15
30: PERIOD_M30
60: PERIOD_H1
120: PERIOD_H2
240: PERIOD_H4
480: PERIOD_H8
1440: PERIOD_D1
7200: PERIOD_W1
216000: PERIOD_MN1
https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes
if (FALSE) { # Red line in all EURUSD charts at 1.1772 MT5.DrawHorizontalLine("EURUSD", 1.1772, iColor = 3) }