hasStrat {ichimoku} | R 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)
[Package ichimoku version 1.5.3 Index]