Moving Averages:
A 20-period Simple Moving Average (SMA) short_ma.
A 50-period Simple Moving Average (SMA) long_ma.
Buy and Sell Signals:
Buy signal when the short-term 20-period moving average crosses above the long-term 50-period moving average (crossover).
Sell signal when the 20-period moving average crosses below the 50-period moving average (crossunder).
Visualization:
Green "BUY" labels plotted below the bars for buy signals.
Red "SELL" labels plotted above the bars for sell signals.
The 20-period and 50-period moving averages are also plotted in blue and orange respectively.