How to Run the TBOT-WIND

How to Run the TBOT-WIND

Background

TBOT-Wind is written in Python, utilizing libraries such as Redis, Asyncio, and IB-Async. To install and run TBOT-Wind, you should use a Python package management tool called Poetry.

 What is Python Poetry?

Python Poetry is a tool designed to manage dependencies and packaging for Python projects. It simplifies the process of creating and maintaining Python environments, handling dependencies, and building project distributions. Poetry ensures that your project uses consistent versions of its dependencies and makes it easy to install and update them.

How to Run the Program

Step 1: Download the Program

First, clone the TBOT-Wind repository from GitHub:

git clone https://github.com/PlusGenie/tbot-wind.git

 Step 2: Install Poetry (if not already installed)

If you don’t have Poetry installed, you can install it using pip:

pip install poetry

 

Step 3: Install TBOT-Wind

Navigate to the tbot-wind directory and install the required dependencies using Poetry:

cd tbot-wind

poetry install

Setting up the Environment Variables

By default, the webhook messages generated by TBOT-Wind will be sent to TBOT on TradingBoat using HTTP. Therefore, most environment variables are common to both TBOT and TBOT-Wind.

To run the sample indicators, you need to configure the following variables and save them into a dotenv file.

By default, the sample dotenv file can be found in the following directory:

cp src/tbot_wind/user/dotenv .env

 

Copy the file and save it as .env in your home directory. If you already have a .env file used for TBOT on TradingBoat, you can add the following variable to your existing .env file:

TBOT_WIND_HTTP_SERVER_ADDR="http://localhost:5000/webhook"

Make sure to change the server address based on your configuration.

The table below explains the essential environment variables needed to run the sample indicators:

 Launching TBOT-WIND

Factory Reset Database:

If you are running the indicators for the first time, you'll need historical market data. This data will be saved to the database, and any existing data will be overwritten.

poetry run tbot-wind --init-db

Run the sample indicators:

After configuring the environment variables, you're ready to run TBOT-Wind. Use the following command to start the program:

poetry run tbot-wind 

Verifying TBOT-WIND

There are two ways to verify whether the sample indicators from TBOT-Wind are generating webhook messages:

1. Using TBOT on TradingBoat

If you have TBOT installed on TradingBoat, you can visit the "Alert Tables" webpage to verify the messages. For more information about TBOT on TradingBoat, you can follow this link.

  1. Using TBOT-Wind Log Messages

If you don’t have TBOT on TradingBoat or if you want to use TBOT-Wind to generate your own webhooks, you can check the log file. The log file will be created at the path specified by the TBOT_WIND_LOGFILE variable in your .env file.

To check if this variable is set correctly, you can use:

grep TBOT_WIND_LOGFILE .env

Summary of Steps

Below is a sequence diagram summarizing the key steps from downloading TBOT-Wind to verifying its operation:

Subscribe to TBOT on TradingBoat

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe