In this recipe, you will perform real trading on the EMA-Regular-Order strategy. You must have fetched this strategy from your account on the AlgoBulls platform in the preceding recipe of this chapter. You will leverage the real trading functionality facilitated by pyalgotrading for this recipe, which, in turn, submits a real trading job on the AlgoBulls platform.
Once submitted, real trading will be run by the AlgoBulls real trading engine. You can query its status any time to find out about the state of the real trading job. The job goes through the following states, in the given order:
- STARTING (intermediate state)
- STARTED (stable state)
- STOPPING (intermediate state)
- STOPPED (stable state)
On submitting a job, it starts with an intermediate state, STARTING. In this state, the AlgoBulls real trading engine fetches the strategy and gets the execution environment ready, which may take a couple of minutes. Once...