This is a simple example of how you can compile your own strategy
This script contains the code for alerts and for backtesting.
In order to use the backtester, comment out the sections to be used for signals, and comment in the sections to be used on the back tester, and visa versa for using the script for alerts in order to automate your own bot.