TradingView’s Pine Script ecosystem contains thousands of open-source technical analysis indicators built and maintained by the global trading community. The problem is that UZSE — like many regional emerging-market exchanges — is simply not listed on TradingView: no data feed, no charting, no indicators. The UZSE Backtest App bridges this gap by executing Pine Script v6 indicators locally against candle data stored in MongoDB, giving you the full analytical power of the Pine Script library on a market that TradingView has never seen.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.
Why Pine Script on UZSE?
Many frontier and emerging-market exchanges — including MSE (Mongolia), UZSE (Uzbekistan), DSE (Dhaka), GSE (Ghana), and others — have no presence on TradingView. Their official websites typically expose only paginated raw trade tables, with no minute-level timestamps and no charting. By scraping those trades, building OHLCV candles, and feeding them into the backtest-kit editor, you can apply any Pine Script indicator to these markets as if they were listed on a major exchange.Pine Script Execution Engine
The@backtest-kit/pinets package (v10.2.0+) provides a TypeScript-native Pine Script v6 execution runtime. It is loaded automatically when the editor starts — no separate compilation step is required. You can overlay indicators on the chart directly from the editor UI by loading any .pine file from disk.
UZSE market characteristics directly affect indicator behaviour. Single-price auction days produce a single candle with high volume surrounded by many zero-volume flat candles. Multi-day trading halts create extended flat regions. Indicators that rely on recent volume (such as the DeltaPulse Wave) will produce neutral readings across those gaps and spike sharply when trading resumes. Treat divergence signals that occur immediately after a halt with extra caution.
Bundled Indicator: DeltaPulse Wave
The project ships withmath/deltapulse_wave.pine — the DeltaPulse Wave [ChartPrime] oscillator. It is a practical first indicator to load because it relies on volume rather than just price, making its behaviour on low-liquidity UZSE securities especially informative.
What It Does
The DeltaPulse Wave computes a Relative Delta Strength (RDS) oscillator by comparing EMA-smoothed buy volume against EMA-smoothed sell volume, both normalised to total volume, and scaling the result to a ±100 range. A second EMA smoothing pass produces the final wave line.- Positive wave values indicate that buy-side volume dominates — bullish pressure.
- Negative wave values indicate that sell-side volume dominates — bearish pressure.
- The oscillator also detects divergences between price action and the wave: a bearish divergence forms when price makes a higher high while the wave makes a lower high; a bullish divergence forms when price makes a lower low while the wave makes a higher low.
- An on-chart dashboard shows the current wave value, trend direction, and last detected divergence type.
Key Calculation
close > open contribute their full volume to buyVol; candles where close < open contribute to sellVol. The ratio (smoothedBuy - smoothedSell) / smoothedTot is then scaled to ±100 and smoothed once more to produce deltaWave.
Divergence Detection
minGap, default 5) is required between two peaks or troughs before a divergence is confirmed, reducing noise on sparse UZSE data.
Input Parameters
Wave Lookback — the EMA period used to smooth buy volume, sell volume, and total volume before computing the RDS ratio. Minimum value is
5. Increase this on low-liquidity symbols to reduce noise.Smoothing — the second EMA pass applied to the raw RDS value to produce the final
deltaWave line. Minimum value is 1.Upper Threshold (OB) — the overbought level drawn as a reference line on the oscillator pane. Minimum value is
1.0.Lower Threshold (OS) — the oversold level drawn as a reference line on the oscillator pane. Maximum value is
-1.0.Min Divergence Gap — the minimum number of bars required between two wave peaks or troughs before a divergence signal is confirmed. Minimum value is
2.Show Divergence Lines — when enabled, draws connecting lines on both the oscillator pane and the main price chart between the two pivot points that form each confirmed divergence.
Dashboard
WhenshowDash is enabled (default true), the indicator renders a small table in one corner of the chart (configurable via dashPos and dashSize) showing a header row and three data rows:
| Row | Description |
|---|---|
| Header | Column labels: "DeltaPulse" and "Value" |
| Wave | The current numeric value of deltaWave, colour-coded bullish or bearish |
| Trend | "Bullish" when deltaWave > 0, "Bearish" when deltaWave < 0 |
| Last Div | The most recently detected divergence type: "Bullish", "Bearish", or "None" |
Adding Custom Indicators
Write or download a Pine Script v6 indicator
Create a
.pine file or copy one from TradingView’s public library. Ensure the script declares //@version=6 at the top. Pine Script v5 scripts may require minor syntax updates.Place the file in your project directory
Drop the
.pine file anywhere inside the project folder — for example, math/my_indicator.pine. The editor file picker scans the project directory recursively.Related Pages
Visual Editor
Learn how to start the backtest-kit editor and configure the MongoDB connection.
Exchange Module
Understand how MongoDB candle data is exposed to the editor via
addExchangeSchema.Build Candles
Generate the OHLCV candle data that Pine Script indicators are applied to.
Timeframes Reference
See all supported candlestick intervals from 1m to 1d.