Three steps, no code
Add the free OptAlgo Backtest template to your chart and pick any indicator as the signal. Backtest it right on the chart and paste your Strategy Key. Create the alert: the message is generated for you, and your bot trades around the clock.