In this recipe, you will upload the strategy class, StrategyMACDBracketOrder, which you created in the preceding five 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 the 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 pyalgostrategypool.strategy_macd_bracket_order import StrategyMACDBracketOrder
>>> from pyalgotrading.algobulls import AlgoBullsConnection
- Create a new AlgoBulls connection...