You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to make another attempt to better illustrate the bullish or bearish character of the Kumo cloud. To do this, I used the option of creating a custom plot. I have attached the coding below. However, the plot stops as soon as there is no more data on the price. It would be nice if the plot was displayed until the last available day of the cloud. Maybe others have further suggestions.
Best regards, Steve
library(ichimoku)
library(dplyr)
library(timetk)
cloud <- ichimoku(sample_ohlc_data)
# Recognize whether the cloud is bullish or bearish.
df_cloud <- as.data.frame(cloud) |>
mutate(market_trend = case_when(senkouA > senkouB ~ 1,
senkouA == senkouB ~ 0,
senkouA < senkouB ~ -1,
TRUE ~ NA))
# back to xts-object
df_cloud_xts <- timetk::tk_xts(df_cloud, by = df_cloud$index)
# Merging original and new calculated data
cloud <- merge(cloud, df_cloud_xts)
# Plotting
plot(cloud, theme = "classic")
plot(cloud,
theme = "classic",
type = "line",
custom = "market_trend")
plot(cloud,
theme = "classic",
type = "bar",
custom = "market_trend")
# https://cran.r-project.org/web/packages/ichimoku/vignettes/reference.html#plot
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I would like to make another attempt to better illustrate the bullish or bearish character of the Kumo cloud. To do this, I used the option of creating a custom plot. I have attached the coding below. However, the plot stops as soon as there is no more data on the price. It would be nice if the plot was displayed until the last available day of the cloud. Maybe others have further suggestions.
Best regards, Steve
All reactions