You must have plot the candle plots and the volume before plotting the SMA. The candle plot doesn't have any labeled object, when you call the plt.legend()
, it tries to plot a label for every plot on the current axes. Therefore, you get this UserWarning: No labeled objects found. Use label='...' kwarg on indivial plots.
To solve it, I hope it is clear at this point, simply requires you to plot the SMA's very first, before the candle plot, and call the legend()
right after that before any other plots being generated.