I have prepared a notebook (in the backtest attached, please check just the notebook as the backtest is just a dummy in order to share the project) to plot the intraday trades of the backtests order. Everything works fine except for the fact that, in the last cell, I get a candle chart plotted BEFORE the dropdown menu to select the trading day and then, when a new day is selected, a new candle chart appears also BELOW the original chart (and below the dropdown, correctly) and there is no way to remove/clear the first chart.

I don't know if anybody is familiar with ipywidgets and plotly but if you see any obvious mistake I'm making it would be very helpful!