Example IB_insync bot for Trader Workstation API with Hydra
Ensure you have git2.2 and python3.8 and higher installed.
Clone the repository.
Activate virtual environments and install requirements.
Edit config.yaml file.
Iterate on each timeframe:
+----------------------------+ +----------------------------+ +----------------------------+
| Scan For Stock In Scanner | | Check Open Orders | | Check Positions |
| | | | | |
+-------------+--------------+ +-------------+--------------+ +-------------+--------------+
| | |
v v v
+-------------+--------------+ +-------------+--------------+ +-------------+--------------+
| Check If Stock Not In Open | | If Order Not Good (Terms) | | If New Terms Close |
| Orders Or In Positions | | Cancel It | | |
+-------------+--------------+ +----------------------------+ +----------------------------+
|
v
+-------------+--------------+
| Check Terms For Each Stock |
| |
+--^----------+--------------+
| |
| v
| +---+---+ Yes +--------------------+
+------+ Terms +------->+ Transmit New Order |
+-------+ +--------------------+
You can run tests by running python -m unittest discover test
.
Code coverage is enabled by default.