Indicators are drawn on the chart in the following scenarios:
a. crossover occurs on a single bar
b. was below the Oversold threshold (29 by default) within the prior 5 bars
a. crossover occurs on a singnle bar
b. was above the Overbought threshold (71 by default) within the prior 5 bars
1. Make a copy of the script.
2. on line 1, change code to " strategy(title="MACD crossover while RSI Oversold/Overbought", overlay=true, shorttitle="MACD Cross + RSI Oversold Overbought") "
3. add this to the end of the script,
strategy.entry("buy", true, when = crossoverBull and wasOversold)
strategy.close("buy", when = crossoverBear and wasOverbought)