hasStrat: hasStrat

View source: R/strat.R

hasStratR Documentation

hasStrat

Description

A function for checking if an object contains a strategy.

Usage

hasStrat(x)

Arguments

x

an object.

Details

Designed to be used by ichimoku functions that are either S3 methods for class 'ichimoku' or after validation that 'x' is an ichimoku object, hence there is no check on the class of 'x' within this function.

Value

A logical value of TRUE if the 'strat' attribute of 'x' is set, otherwise FALSE.

Examples

cloud <- ichimoku(sample_ohlc_data)
strat <- strat(cloud)

# TRUE:
hasStrat(strat)
# FALSE:
hasStrat(cloud)


ichimoku documentation built on May 23, 2022, 9:05 a.m.