alert_marker: Alert Marker

Description Usage Arguments Value See Also Examples

View source: R/alert_marker.R

Description

The alert marker was developed by Alexander Elder. The alert marker is part of the impulse system described in his book "Come Into My Trading Room" on pages 158-162.

Usage

1
alert_marker(x, n = 13)

Arguments

x

an xts object that contains OHLC data.

n

Number of periods for the ema period. Default is 13.

Value

returns an xts object with marker values.

See Also

Other Alexander Elder functions: safezone(), thermometer()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
library(quantmod)
ADM <- getSymbols("ADM", 
                  from = "2018-01-01", 
                  to = "2018-07-01", 
                  auto.assign = FALSE)
                  
chartSeries(ADM) 
markers <- alert_marker(ADM)

# define colours
cols <- ifelse(markers == quantmod::Hi(ADM), "green", "red")

addPoints(1:nrow(markers), markers, col= cols, pch=19, cex=0.5, on = 1)

## End(Not run)

pverspeelt/Quantfunctions documentation built on Oct. 10, 2021, 1:01 p.m.