I have looked through similar questions and I have a feeling I have done everything. Still not getting the desire output. I am using ggplot2 and tidyquant packages to visualize data with 2 financial trends I am trying to display a legend that contains trends line coloron plot
data %>%
ggplot(aes(date, price)) +
geom_line() +
geom_ma(ma_fun = SMA, n = 50, size = 1 , col = "red" , show.legend = TRUE)+
geom_ma(ma_fun = SMA, n = 200, size = 1 , col = "blue", show.legend= TRUE)+
theme_tq()