Learn R Programming

quantstrat (version 0.16.7)

sigPeak: signal function for peak/valley signals

Description

This function tests to see if the mktdata or indicator column observations on either side are lower(higher) creating a local peak(bottom).

Usage

sigPeak(label, data, column, direction = c("peak", "bottom"))

Arguments

label

text label to apply to the output

data

data to apply comparison to

column

named column to apply comparison to

direction

one of "peak" or "bottom" to calculate peaks for