get_technical_indicator_data {eodhd}R Documentation

Get technical indicator data

Description

This function retrieves technical indicator data from the API.

Usage

get_technical_indicator_data(
  api_token,
  ticker,
  func,
  period = 50,
  date_from = NULL,
  date_to = NULL,
  order = "a",
  splitadjusted_only = "0"
)

Arguments

api_token

The API token for authentication.

ticker

consists of two parts: [SYMBOL_NAME].[EXCHANGE_ID]

func

the function that will be applied to data series to get technical indicator data.

period

the number of data points used to calculate each moving average value.

date_from

date from with format Y-m-d.

date_to

date from with format Y-m-d.

order

use ‘a’ for ascending dates (from old to new) and ‘d’ for descending dates (from new to old). By default, dates are shown in ascending order.

splitadjusted_only

By default, we calculate data for some functions by closes adjusted with splits and dividends. If you need to calculate the data by closes adjusted only with splits, set this parameter to ‘1’. Works with the following functions: sma, ema, wma, volatility, rsi, slope, and macd.

Value

A list containing the technical indicator data.

Examples

api_token <- "demo"
ticker <- "AAPL.US"
func <- "sma"
period <- "100"
date_from <- "2017-09-10"
date_to <- "2017-09-12"
order <- "d"
splitadjusted_only <- "1"
result <- get_technical_indicator_data(api_token, ticker, func, period,
date_from, date_to, order, splitadjusted_only)


[Package eodhd version 1.0.4 Index]