Documentation & Guides

How StockTrendz AIβ„’
Works β€” Explained

A complete walkthrough of every feature, the technology behind the platform, and how to get the most out of AI-powered pattern recognition.

Overview Market Analysis Stock Analysis Live Chart How It Works Tech Stack Glossary FAQ

Overview

What is StockTrendz AIβ„’?

StockTrendz AIβ„’ is an intelligent trading analytics platform that uses machine learning to detect, score, and explain chart patterns in real time β€” giving every trader an AI co-pilot.

AI-Powered Pattern Recognition

The platform continuously scans live candlestick data and compares it against a large historical database using multiple similarity algorithms. When a strong pattern match is found, you get instant visual feedback and an AI-generated insight.

  • Works across NSE, BSE, and other global markets
  • Supports 15-minute and 1-hour timeframes for intraday analysis
  • Pattern similarity scored using DTW, Cosine, and Pearson correlation
  • No manual drawing or indicator configuration required
BTC-USD Price $64,693 Pattern Similarity 93.9% Active Alerts 0 Last Updated 7:51:04 AM BTC-USD Β· 15m Closest Historical Match Best match: 2026-02-21 β†’ 2026-02-23 (Downtrend) AI Insights: Pattern Match: Consolidation β€” 93.9% similarity RSI Signal: RSI 17.4 β€” oversold (<30)

Feature Guide

Market Analysis Dashboard

Real-time candlestick data combined with historical analog matching β€” all in one powerful view.

Live Price & Pattern Tiles

The top row of stat cards gives you an immediate snapshot: current asset price, the pattern similarity score for the best historical match, active alert count, and the last-refresh timestamp.

  • BTC-USD Price β€” Live spot price with % change badge
  • Pattern Similarity β€” Composite score; β‰₯ 85% = "High Confidence"
  • Active Alerts β€” Number of triggered price/pattern alerts
  • Last Updated β€” Auto-refreshes every interval you select
NSE BSE Other πŸ” BTC-USD 15m 1h 4h 1d ↻ Refresh BTC-USD Price $64,693 -0.04% Pattern Similarity 93.9% High Confidence Active Alerts 0 Monitoring Last Updated 7:51:04 AM ● Live AI Insights Downtrend βŠ• Pattern Match: Consolidation β€” 93.9% βŠ• RSI Signal: 17.4 β€” oversold (<30) βŠ• Trend: Downtrend Active Alerts New Alert πŸ”” No active alerts

Historical Analog Matching

The right panel displays the closest historical window found β€” showing the full candlestick sequence side-by-side with similarity metrics beneath the chart.

  • DTW (Dynamic Time Warping) β€” Shape similarity even with time-offset patterns
  • Cosine Similarity β€” Direction and magnitude alignment score
  • Pearson Correlation β€” Linear correlation between current and historical price moves
  • Movement Score β€” Weighted % of matching up/down candles
  • Also shows RSI, SMA-20, and SMA-50 for the matched period
Closest Historical Match Best match: 2026-02-21 β†’ 2026-02-23 (Downtrend) O $64,424 H $64,789 L $64,401 C $64,693 β–² 0.42% DTW 86.8% Cosine 91.1% Pearson 77.1% Movement 44.9% RSI 17.4 SMA 20 67360 SMA 50 67804

Feature Guide

Stock Analysis & Scoring

Search any NSE/BSE stock and receive an AI-scored Bullish Signal Detected / Hold / Sell signal backed by live pattern engine data and fundamental company information.

Bullish Signal Detected / Neutral Structure / Bearish Signal Detected Score

Enter a ticker (e.g. TCS, INFY, RELIANCE) and the platform instantly scores the stock on a 0-100 composite scale, combining technical pattern signals with momentum indicators.

  • Score 0–39: Bearish Signal Detected signal (bearish technical picture)
  • Score 40–60: Neutral Structure (mixed signals, wait for clarity)
  • Score 61–100: Bullish Signal Detected (strong bullish pattern detected)
  • Powered by the same pattern engine as Market Analysis
  • Last price pulled live from Yahoo Finance / NSE feed
NSE BSE Other TCS Search Stock TCS.NS Score 20 Signal SELL Last Price β‚Ή2685 Live Pattern Engine Pattern Consolidation Similarity 93.8% Next Candle Up 80% Next 5 Trend Up 90% Completion Probability 99.51%

Feature Guide

Live Chart & Pattern Library

An interactive charting workspace that overlays real-time candlestick data with AI-detected pattern matches and probability rankings from a built-in pattern library.

Overall Sentiment & Top Patterns

The right sidebar continuously evaluates the current chart against a pattern library of 30+ classical formations, scoring each one and ranking them by probability. An Overall Sentiment gauge combines all signals into a Bullish / Bearish / Neutral reading.

  • Patterns include: Rising Wedge, Bull Pennant, Head & Shoulders, Triple Top, Wyckoff phases, and many more
  • Each pattern card shows a visual thumbnail and direction tag (BEARISH / BULLISH / NEUTRAL)
  • Click a pattern card to see a detailed explanation and historical win-rate
  • Auto-refresh toggle keeps the analysis live without manual intervention
  • Supports 1M, 5M, 15M, 30M, 1H, 4H, 1D, 1WK timeframes
ASHOKAMET.NS β‚Ή16 +0% 15 Minutes Β· 117 bars OVERALL SENTIMENT Bullish 34.9% Bearish 41.8% Neutral 23.2% TOP MATCHING PATTERNS #1 Rising Wedge... BEARISH 100% Rectangle... NEUTRAL 100% PATTERN PROBABILITIES Rising Wedge (after up...) 100% Rectangle (Trading Range) 100% Bull Pennant 80% Rising Wedge (downtrend) 80% Wyckoff Re-Accumulation 70.2%

Under the Hood

How It Works

From raw market data to actionable AI insights β€” four tightly integrated steps run every time you load a chart.

01

Live Market Data

The backend connects to live market APIs (Yahoo Finance / NSE feed) and streams OHLCV candlestick data into the platform. Each candle is validated, normalised, and stored for pattern comparison.

02

Pattern Recognition Engine

The AI engine extracts the most recent N candles, normalises the price sequence, and runs it through DTW, Cosine Similarity, and Pearson Correlation algorithms against a large historical dataset to find the closest analogs.

03

Visual Match Display

The best historical match window is rendered as a full interactive chart alongside the live chart. Similarity metrics (DTW, Cosine, Pearson, Movement) and technical indicators (RSI, SMA-20, SMA-50) are displayed below for comparison.

04

Insights & Recommendations

The AI layer synthesises all signals into natural-language insights: trend direction, RSI status, pattern match confidence, and next-candle probability estimates. Alerts can be set to trigger when conditions are met.


Technology

Built With Modern Technology

Every layer of the stack is chosen for performance, reliability, and developer velocity.

🐍

Python & Flask

The server-side engine is built with Flask, handling API routing, data ingestion, and the pattern recognition algorithms. NumPy and SciPy power the similarity computations.

πŸ—„οΈ

PostgreSQL

Historical OHLCV data, user accounts, alert configurations, and pattern metadata are stored in a robust PostgreSQL database with time-series optimisations.

πŸ“Š

Chart.js / Lightweight Charts

Interactive candlestick charts are rendered client-side using TradingView's Lightweight Charts library, delivering fast, smooth 60fps performance.

πŸ€–

AI Pattern Engine

A custom similarity engine uses Dynamic Time Warping (DTW) to compare normalised price series, with Cosine and Pearson correlation as secondary scoring dimensions.

πŸ“‘

REST API + Yahoo Finance

Live and historical data is sourced via a REST API layer that wraps Yahoo Finance and direct NSE/BSE feeds, with automatic retry and caching logic built in.

🎨

HTML5 / CSS3 / JavaScript

The frontend is handcrafted in vanilla HTML, CSS, and JavaScript β€” no heavy framework overhead β€” resulting in fast page loads and a smooth user experience.


Reference

Key Terms Glossary

Quick definitions for every metric and term you'll encounter on the platform.

DTW (Dynamic Time Warping)
An algorithm that measures similarity between two time-series sequences that may be offset or stretched in time. Higher DTW similarity = closer shape match.
Cosine Similarity
Measures the angle between two price-vector sequences. A score of 100% means identical direction and magnitude; 0% means no correlation.
Pearson Correlation
A statistical measure of the linear relationship between current and historical price sequences. Ranges from βˆ’1 (inverse) to +1 (perfect match).
RSI (Relative Strength Index)
A momentum oscillator (0–100). Values below 30 indicate oversold conditions; above 70 indicates overbought. The platform highlights both extremes.
SMA (Simple Moving Average)
The average closing price over a rolling window (e.g. SMA-20 = average of last 20 candles). Used to identify trend direction and support/resistance zones.
Pattern Similarity Score
A composite score (0–100%) combining DTW, Cosine, and Pearson metrics. Scores β‰₯ 85% are labelled "High Confidence" and are the most actionable matches.
Next Candle Up / Down
A probability estimate for whether the next candle will close higher or lower, derived from how historical analogs behaved one candle after the matched window.
Completion Probability
How likely the currently detected pattern is to "complete" (reach its typical price target), based on historical completion rates for that pattern type.
Consolidation Pattern
A period where price moves sideways within a tight range, often preceding a breakout. The platform detects this as a distinct pattern type with associated breakout probabilities.
Wyckoff Phases
A market cycle theory describing Accumulation, Mark-Up, Distribution, and Mark-Down phases. The platform identifies Wyckoff Re-Accumulation and Accumulation patterns specifically.

FAQ

Frequently Asked Questions

Everything you need to know before getting started.

The platform supports NSE (National Stock Exchange of India), BSE (Bombay Stock Exchange), and global markets available through Yahoo Finance tickers. Crypto pairs like BTC-USD, ETH-USD are also supported in the Market Analysis dashboard.
The Market Analysis dashboard and Live Chart support configurable auto-refresh. In the 15-minute timeframe, data updates every 15 minutes. You can also trigger a manual refresh at any time using the Refresh button. Real-time streaming is not yet supported β€” data is polled at interval boundaries.
The score combines multiple technical factors: pattern similarity score, trend direction (up/down), RSI reading, momentum indicators, and historical next-candle win rates from matched analogs. Each factor is weighted and summed into a 0–100 composite. Scores below 40 trigger Bearish Signal Detected, 40–60 is Neutral Structure, and above 60 is Bullish Signal Detected.
No. StockTrendz AIβ„’ is a data analysis and educational tool. All signals, scores, and insights are generated algorithmically and are not personalised financial advice. Always consult a qualified financial advisor before making investment decisions. Past pattern performance does not guarantee future results.
The Live Chart pattern library currently includes 30+ classical chart formations, including Rising Wedge, Bull/Bear Flag, Pennant, Head & Shoulders, Triple Top/Bottom, Ascending/Descending Triangles, Rectangle (Trading Range), Wyckoff Accumulation & Re-Accumulation, Rounded Bottom/Top, and more.
Yes. The Active Alerts panel in the Market Analysis dashboard lets you create new alerts. Alerts can be triggered when pattern similarity exceeds a threshold, when a specific pattern is detected, or based on price levels. Triggered alerts appear in the Active Alerts panel and can be managed from there.
The Live Chart supports 1M, 5M, 15M, 30M, 1H, 4H, 1D, and 1WK timeframes. The Market Analysis dashboard currently focuses on 15-minute and 1-hour intervals for pattern similarity matching. Stock Analysis uses daily data for scoring.

Ready to Start Pattern Trading?

Join StockTrendz AIβ„’ and let AI find your next high-confidence trade.

Try Live Chart Open Dashboard