You will need the following to perform this tutorial:

  1. AlgoBulls Account (Link) - You will need this account to upload and test your strategies. The account needs to be setup with the proper risk management values and a binded broker before any trades can be excecuted. Make sure the account is properly setup or contact AlgoBulls Support for any help.
  2. Python 3.7+ (Link) - The AlgoBulls platform can run all strategies that conform to Python 3.7 and above.
  3. A Python IDE of your choice, like Pycharm (Link) - As mentioned in the [Introduction], this tutorial will demonstrate the pyalgotrading package by implementing the Simple Moving Average Crossover Strategy for Regular Orders. You will make this strategy as a separate python file, and the PyCharm Community Edition IDE is enough for this purpose. If you are already using a Python IDE of your choice, you may skip this step.
  4. TA-Lib Package (Link) - This package encompasses all Technical Indicators used in Technical Analysis by strategists. You will need this package to compute Moving Average (SMA) for the example.
  5. pyalgotrading Package (Link) - This package has all the necessary classes to create strategies. For the SMA strategy, you will subclass your class from the StrategyBase class which is present in this package.
  6. Jupyter Notebook (Link) - You will use a Jupyter Notebook to connect to the AlgoBulls platform. You will upload the strategy, test your strategy (Backtest, Paper Trade, Real Trade), and fetch logs using the notebook.


  • It is a good idea to setup a virtual environment first
  • Install Python 3.7+
  • Once Python is installed, most packages are easily installed in your venv using pip install command
  • pip install TA-Lib
  • pip install pyalgotrading
  • pip install jupyterlab

Last update: