MT5.DrawHorizontalLine: Draw horizontal line

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Source_MT5.R

Description

Draw horizontal line into MT5 chart(s).

Usage

1
2
3
4
5
6
7
8
MT5.DrawHorizontalLine(
  sSymbol,
  fPrice,
  iWidth = 1,
  iColor = 1,
  sName = "",
  iTF = 0
)

Arguments

sSymbol

character; target symbol.

fPrice

numeric; at which price will be draw the line.

iWidth

int; which width will be draw the line (default 1).

iColor

int; See details (default 1: clrGreen).

sName

character; unique name if you want further modifications in lines parameters.

iTF

int; its always in minutes. If iTF = 0 it will be draw on all time frames (default 0). See details.

Details

Supported colors (iColor). See url below for even more details.

https://www.mql5.com/en/docs/constants/objectconstants/webcolors

Supported time frames (iTF). See url below for even more details.

https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes

Value

Returns TRUE if the line was drawn, FALSE otherwise.

Author(s)

Guilherme Kinzel, guikinzel@gmail.com

See Also

MT5.RemoveAllChartsObjects()

Examples

1
2
3
4
5
6
## Not run: 
# Red line in all EURUSD charts at 1.1772
MT5.DrawHorizontalLine("EURUSD", 1.1772, iColor = 3)


## End(Not run)

Kinzel/mt5r documentation built on March 25, 2021, 9:57 p.m.