'Rshiny interactivity with library(ichimoku)

Good evening. I would like to use the ichimiko package for an interactive visualization in r shiny. I would like that every time the user choose a sticker, the graphic can change automatically. When I put the code in the ui interface I get the following error ('cloud not existing').

But if I save the code before running the shinyApp, the code work Well. I get the graphic but the plot IS very great

ichimoku(getSymbols("AAPL", src = "yahoo", from=start_date, to=end_date, auto.assign=F))-> cloud

Below is the code.

library(ichimoku)
library(shiny)
library(quantmod)

start_date <- Sys.Date()-365
end_date <- Sys.Date()

ui <- fluidPage("Stock market",
                titlePanel("Stop market App"),
                
                sidebarLayout(
                  sidebarPanel(
  textInput("Stock","Input Stock"),
  selectInput("Stock", label = "Stock :", choices = c("DIA",
                                   "MSFT",
                                   "FB",
                                   "AAPL",
                                   "GOOG"), selected = "AAPL", multiple = FALSE),
  actionButton("GO","GO")),
  mainPanel(br(),
  h2(align = "center", strong("ICHIMOKU CLOUD PLOT")),
  iplot(cloud, width = 1000, height = 1000)
)))

server <- function(input, output, session){
  cs <- new.env()
  data <- eventReactive(input$GO,{
    req(input$Stock)
    getSymbols(input$Stock, src = "yahoo", 
               from=start_date, to=end_date, auto.assign=F)
  })
  
  cloud1 <- reactive({
    dt<- data()
    cloud <- ichimoku(dt)
  })
  cloud <- ichimoku(cloud1(), ticker = input$Stock)
  
}


shinyApp(ui = ui, server = server)```

IS it also possible to fix the bslib at the left and down side?

[![I just copy a little part of the code.][1]][1]


  [1]: https://i.stack.imgur.com/UZuKn.jpg


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source