Welcome to Technical Analysis Terminal
Relevant source files
The following files were used as context for generating this wiki page:
Technical Analysis Terminal is a specialized trading platform designed for testing algorithms and financial strategies using the Tinkoff API. The project integrates a React-based frontend with a multi-layered backend consisting of a Node.js server and a Python-based indicator calculation service. It provides developers with the capability to implement custom trading logic and visualize results through interactive candlestick charts.
Sources: readme.md:1-5
System Architecture
The project is structured as a monorepo containing a frontend application, a backend service, and a dedicated package for technical indicators. The system relies on a three-tier execution model involving React for the UI, NestJS/Node.js for core logic, and Python for heavy mathematical computations related to indicators.
Component Interaction Flow
The following diagram illustrates the high-level interaction between the different components of the terminal when calculating indicators and rendering charts.
The frontend initiates requests for market data via the backend to the Tinkoff API while offloading indicator math to a dedicated Python service.
Sources: readme.md:10-18, frontend/src/pages/chart/indicatorsTemplates/vwap.ts:15-28
Core Modules
1. Technical Indicators Package (@aduryagin/technical-indicators)
This package provides a comprehensive suite of technical analysis tools. A key feature is the ability to update or add the last item (candle) of a result, which is critical for real-time data processing via WebSockets.
| Indicator | Type | Description |
|---|---|---|
| ATR | Volatility | Average True Range |
| RSI | Momentum | Relative Strength Index |
| Bollinger Bands | Volatility | Standard deviation-based bands |
| Williams Vix | Sentiment | Market bottom finder template |
| VWAP | Volume | Volume Weighted Average Price |
Sources: packages/technical-indicators/readme.md:4-28, packages/technical-indicators/package.json:2-5
2. KLineChart Visualization
The terminal utilizes a lightweight K-Line chart library built with HTML5 canvas. This module supports complex rendering tasks including:
- Technical Indicator Templates: Custom logic for calculating and drawing indicators like MACD or KDJ.
- Shape Overlays: Support for drawing segments and price channel lines.
- Real-time Updates: Methods like
applyNewDataandoverrideTechnicalIndicatorfor dynamic chart manipulation.
Sources: frontend/src/klinechart/README.md:1-5, frontend/src/klinechart/tests/technical-indicator-override.html:36-58
Algorithm Testing
Strategy testing is centralized within the backend. Users can modify the testing logic by editing the algorithm implementation.
The algorithm testing module allows for rapid iteration of strategies by modifying a single entry point in the backend.
Sources: readme.md:7-9
Indicator Calculation Workflow
The system supports multiple calculation methods for indicators. Some are computed in the frontend via Web Workers, while others are offloaded to an external Python service.
Williams Vix Calculation (Web Worker)
For indicators like Williams Vix (WVX), the terminal uses a dedicated worker to prevent blocking the UI thread.
Sources: frontend/src/pages/chart/indicatorsTemplates/williamsVix.ts:4-38
VWAP Calculation (External Service)
For volume-weighted calculations, the system sends a POST request to a Python-based calculator.
const response = await fetch(`${config.python}/indicator-calculator`, {
method: "post",
body: JSON.stringify({
candles: kLineDataList,
indicator: { name: "vwap" },
}),
});
Sources: frontend/src/pages/chart/indicatorsTemplates/vwap.ts:16-25
Installation and Setup
The project requires a specific environment configuration involving Node.js, Python, and Poetry.
| Step | Component | Command |
|---|---|---|
| 1 | Frontend | cd frontend && npm i && npm run start |
| 2 | Backend Env | Create .env with TINKOFF_SECRET |
| 3 | Backend | cd backend && npm i && npm run start:dev |
| 4 | Indicators | cd backend/indicators && poetry install && poetry run python main.py |
Sources: readme.md:11-18
Conclusion
The Technical Analysis Terminal provides a modular framework for professional-grade strategy development. By decoupling the visualization (React/KLineChart), calculation logic (Python/Workers), and data sourcing (Tinkoff API), it enables a scalable environment for both real-time trading and historical backtesting.