Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/theonetrade/uzse-backtest-app/llms.txt

Use this file to discover all available pages before exploring further.

UZSE Backtest App is an open-source toolkit that brings TradingView-style technical analysis to the Uzbekistan Stock Exchange (UZSE) — and by extension, any regional exchange that publishes trade data but isn’t supported by TradingView. It scrapes raw trade records, builds OHLCV candlesticks, and connects them to the backtest-kit visual editor where you can run Pine Script indicators.

Quickstart

Get from zero to a working candlestick chart in under 30 minutes

Prerequisites

Node.js, MongoDB, and Playwright setup before you begin

Download Trades

Scrape paginated trade history from uzse.uz with Playwright

Build Candles

Aggregate raw trades into OHLCV candles across 11 timeframes

Visual Editor

Launch the backtest-kit editor and run Pine Script indicators

Data Reference

MongoDB schemas, collections, and index definitions

How it works

The toolkit runs as a four-stage pipeline:
1

Download trade history

download-trades.ts uses a headless Chromium browser to scrape paginated trade results from uzse.uz, saving each page as an HTML file in a local tmp/ directory.
2

Import into MongoDB

import-trades.ts parses the HTML tables, extracts trade records (timestamp, symbol, price, quantity, volume), and inserts them into the trade-results collection with SHA1-based deduplication.
3

Build OHLCV candlesticks

build-candles.ts reads raw trades from MongoDB, aggregates them into 1-minute buckets, fills intraday and inter-day gaps with the last known close price, then upsamples to 10 higher timeframes — all the way from 3m to 1d.
4

Analyze with Pine Script

npm start launches the backtest-kit visual editor. A custom exchange module feeds MongoDB candle data into the editor so you can run any Pine Script indicator on UZSE symbols.

Why this project exists

TradingView does not list data for many regional exchanges — including UZSE (Uzbekistan), MSE (Mongolia), DSE (Dhaka), and others. Without price charts, applying standard technical analysis tools is impossible. This toolkit solves that by building a self-hosted pipeline from raw exchange data to a fully featured charting environment.
The bulk fetch scripts (fetch.sh / fetch.bat) cover UZSE history from February 2018 through April 2026 for the symbol UZ7011340005 (Hamkorbank / HMKB). You can adapt them for any ISIN listed on UZSE.

Build docs developers (and LLMs) love