In this recipe, you will upload the strategy class, StrategyEMARegularOrder, which you created in the preceding recipes, on the AlgoBulls trading platform. Once it is uploaded, you can perform backtesting, paper trading, and real trading on the same code base.
Getting ready
Make sure you have set up your account on the AlgoBulls platform (https://algobulls.com) to get your API token. Setting up an account is free. Using its services might incur charges depending on your usage. You can start with free packages on the site. Refer to Appendix II for more details.
How to do it…
We execute the following steps for this recipe:
- Import the necessary modules:
>>> import inspect
>>> from pyalgotrading.algobulls import AlgoBullsConnection
>>> from pyalgostrategypool.strategy_ema_regular_order import StrategyEMARegularOrder
- Create a new AlgoBulls connection object:
>...