gap_max: What's the largest gap in the calendar?

gap_maxR Documentation

What's the largest gap in the calendar?

Description

Gives the largest gap in the calendar, in interval units of the supplied bars

Usage

gap_max(
  ext,
  timeframe,
  evar = get0("evar", mode = "environment", envir = rlang::caller_env())
)

Arguments

ext

(environment) with cyclically modified variables in bars_complete

timeframe

(character) For the v1 API, one of

  • 'tr'/'lt'/'trade'/'last_trade' For the last trade price. See Last Trade

  • 'qu'/'lq'/'quote'/'last_quote' For the last quote price. See Last Quote

  • 'm'/'min'`/`'minute' (multiplier can be 1/5/15)

  • 'd'/'day' (multiplier will be 1)

For the v2 IEX/SIP API the following timeframes are supported:

For the "p"/"polygon" API, multiplier can be any positive integer for any one of the following timeframe's:

  • 'm'/'min'/'minute'

  • 'h'/'hour'

  • 'd'/'day'

  • 'w'/'week'

  • 'M'/'mo'/'month' (Note capitalize M for month)

  • 'q'/'quarter'

  • 'y'/'year'

evar

An environment that holds variable constants necessary for sub-functions.


jagg19/AlpacaforR documentation built on July 3, 2023, 12:14 p.m.