stratcombine: Combine Ichimoku Strategies

View source: R/strat.R

stratcombineR Documentation

Combine Ichimoku Strategies

Description

Create custom strategies from combining existing strategies contained in ichimoku objects 's1' and 's2' to form 's1 & s2'.

Usage

stratcombine(s1, s2)

Arguments

s1

an ichimoku object containing a strategy.

s2

an ichimoku object containing a strategy.

Details

The combined strategy 's1 & s2' means indicator conditions in 's1' and 's2' have to be met simulateneously for a trade position to be taken.

The boolean values showing whether these conditions are met are stored in the 'cond' column.

The strategy summary may be accessed by the summary() method for ichimoku objects or via look.

Value

An ichimoku object augmented with the combined strategy.

Further Details

Please refer to the strategies vignette by calling: vignette("strategies", package = "ichimoku")

Examples

cloud <- ichimoku(sample_ohlc_data, ticker = "TKR")
strat1 <- strat(cloud, c1 = "close", c2 = "kijun")
strat2 <- strat(cloud, c1 = "cloudB", c2 = "tenkan")
cstrat <- stratcombine(strat1, strat2)
summary(cstrat)
plot(cstrat)


ichimoku documentation built on Nov. 2, 2023, 5:36 p.m.