I have modified the Alerts so they print on the bar after a BUY/SELL/STOP label is printed instead of the same bar.
The labels repaint on the current bar, after the bar has closed, the label is final and will not repaint.
This prevents a bot from buying or selling based on an alert that may be repainted (invalidated)
If you are using an Alert based trading bot, then modify the Alert messages at the bottom of the script.
If you would like for the bot to send alerts on the current bar rather than the next one, then remove [1] from "buyoption", "strategicsell", and "stop"
I hope this was easy to understand and helpful.