Q&A: Configuring TBOT-WIND for Historical and Market Data Requests

Question:


When using TBOT-WIND to fetch historical data, how do we provide the parameters required for TWS's reqHistoricalData and reqMarketData functions? For example, when running the command:
poetry run tbot-wind --init-db.

Answer:

In summary:

You can refer to the chapter "How to Create a Custom Indicator" in the guide:TBOT-WIND: A Guide to Custom Trading Indicators and Webhooks.

Here's an excerpt from the book:

Using a Configuration File to Define Static Information

Static information refers to details like the ticker symbol and exchange. For example, on NASDAQ, you might choose Google with a 1-day timeframe. This information should be automatically defined.

Define Static Information of Your Custom Order:

  • Ticker symbol
  • Exchange
  • Timeframe
  • Timezone

This information should be updated in a configuration file, YAML. Specifically, open the orders_config.yaml file in the following directory:

tbot_wind/user/orders_config.yaml

You can also specify the indicator name you want to use. Then, update or create your order like this:

orders:
  - symbol: "GOOGL"
    timeframe: "1D"
    timezone: "US/Eastern"
    currency: "USD"
    duration: "4 W"
    bootup_duration: "2 Y"
    end_date: ""
    indicator: "alphatrend"

Using the Custom Indicator Function to Define Dynamic Information

For dynamic parameters like real-time data handling, additional configuration may be required. Refer to the book for details on how to extend the orders_config.yaml file and define custom indicator logic to meet your specific needs.

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