stratcombine {ichimoku} | R Documentation |
Create custom strategies from combining existing strategies contained in ichimoku objects 's1' and 's2' to form 's1 & s2'.
stratcombine(s1, s2)
s1 |
an ichimoku object containing a strategy. |
s2 |
an ichimoku object containing a strategy. |
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
.
An ichimoku object augmented with the combined strategy.
Please refer to the strategies vignette by calling:
vignette("strategies", package = "ichimoku")
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)