Technical Indicators & Built-in Presets
Relevant source files
The following files were used as context for generating this wiki page:
Nexus Scanner uses a hybrid calculation engine to provide technical indicators and built-in scanning presets. The system derives metrics from OHLCV (Open, High, Low, Close, Volume) data and fundamental snapshots to evaluate market conditions. The architecture splits evaluation between a browser-based worker for precomputed metrics and a Python-based evaluator for complex historical conditions.
Technical indicators cover trend, momentum, volatility, and relative strength. Built-in presets leverage these indicators to identify specific market patterns such as Moving Average (MA) stacks, volatility contraction (VCP), and Relative Strength (RS) ratings.
Sources: frontend/README.md, DO NOT DELETE EDL PIPELINE/README.md
Technical Indicator Architecture
The indicator system processes raw market data through multiple stages to produce scan-ready metrics. The pipeline fetches data from external providers, standardizes it, and then calculates technical values during the "Phase 4 (Injection)" stage of the EDL Pipeline.
The diagram shows the flow from raw data to the dual-evaluation engines used for screening.
Sources: DO NOT DELETE EDL PIPELINE/README.md:275-285, frontend/README.md:320-335
Core Indicator Groups
The system categorizes indicators into functional groups used by the condition catalog:
| Category | Key Indicators | Calculation Basis |
|---|---|---|
| Trend | SMA (10, 20, 50, 200), EMA (20, 200) | Based on closing prices over N sessions. |
| Momentum | RSI (14), Return %, Gap % | Relative change in price or oscillator state. |
| Volatility | ATR (14), ADR (20), NR7 | Measures price range and intraday spread. |
| Volume | RVOL (20), Rupee Turnover | Compares current volume to 20-day averages. |
| RS | RS Rating, RS Rank | Benchmarks stock performance against Nifty 500. |
Sources: DO NOT DELETE EDL PIPELINE/README.md:460-505, frontend/src/data/conditionCatalog.ts:65-350
Built-in Scanning Presets
Nexus Scanner includes 45 built-in presets (v1.0.39) that serve as default entry points for researchers. These presets use specific boolean expressions and parameter sets defined in the condition catalog.
Trend and Moving Average Scans
Trend presets identify stocks with specific directional characteristics or proximity to key levels.
- Price vs MA: Evaluates if price is above/below SMA 50 or EMA 20.
- MA Stack Order: Checks for "Bullish Stacks" where shorter MAs are strictly above longer MAs (e.g., EMA 20 > EMA 50 > EMA 200).
- EMA Reclaim: Identifies price crossing back above a key EMA after a pullback within a 3-day window.
Sources: frontend/src/data/conditionCatalog.ts:65-145, frontend/README.md:235-245
Momentum and Volume Scans
These presets detect bursts in trading activity and price velocity.
- Relative Volume (RVOL): Filters for stocks where current volume is 1.5x to 20x higher than the 20-day average.
- Persistent Momentum: Stocks maintaining price above EMA 20 for at least 10 consecutive sessions.
- NSE Delivery %: Filters for stocks with high delivery volume (e.g., > 50%) indicating long-term accumulation.
Sources: frontend/src/data/conditionCatalog.ts:160-230, frontend/README.md:246-260
Condition Evaluation Logic
The system employs a specific logic for handling missing data and boolean operations during screening.
Calculation Conventions
- RVOL 20: The current session is excluded from the denominator to avoid diluting the ratio during high-volume spikes.
- Average Turnover: Calculated as
(Close * Volume) / 10,000,000to represent values in ₹ Crore. - EMA Persistence: Uses an "extreme-based reset rule" rather than requiring every single tick to remain above the line.
Sources: frontend/README.md:255-275, DO NOT DELETE EDL PIPELINE/src/edl_pipeline/transforms/fundamentals.py:320-330
Boolean Expression Handling
The engine supports AND (Match All) and OR (Match Any) operations. It manages "unavailable" data states to prevent false positives:
- Match OR Unavailable: Results in a Match.
- No-Match OR Unavailable: Results in Unavailable.
- Match AND Unavailable: Results in Unavailable.
Sources: frontend/README.md:345-355
Market Breadth Indicators (MBI)
The process_mbi_market_breadth.py script generates specialized breadth artifacts. These include the "XP Proxy" and "MBI Ratios," which measure market participation.
The diagram illustrates the transformation of advance/decline counts into the proprietary XP breadth indicator.
Sources: DO NOT DELETE EDL PIPELINE/src/edl_pipeline/breadth/mbi.py:150-185, DO NOT DELETE EDL PIPELINE/process_mbi_market_breadth.py:50-70
Breadth State Scoring
The MBI system assigns colors to market states based on the relationship between various ratios:
- Green State: Score >= 3 (Bullish participation).
- Red State: Score <= -3 (Bearish participation).
- Warning Day: Triggered when at least 3 indicators are red but the overall state is not yet "Red".
Sources: DO NOT DELETE EDL PIPELINE/src/edl_pipeline/breadth/mbi.py:125-145
Artifact Generation and Storage
Technical indicators are injected into the master analysis file during Phase 4 of the pipeline. The final data is stored in all_stocks_fundamental_analysis.json.gz.
| Artifact Name | Content |
|---|---|
advanced_indicator_data.json | Pivot Points, EMA/SMA signals from ScanX. |
rs_rating_daily.json.gz | Relative Strength ratings against benchmarks. |
sector_analytics.json.gz | MA and 52-week-high breadth for sectors/industries. |
market_breadth_v2.json.gz | MBI ratios, XP values, and quality metrics. |
Sources: DO NOT DELETE EDL PIPELINE/src/edl_pipeline/artifacts.py:40-100, DO NOT DELETE EDL PIPELINE/README.md:280-295
The project maintains a strict validation gate for technical artifacts. If history coverage for equities or indices falls below 90%, the breadth generation fails to prevent inaccurate indicator reporting.
Sources: DO NOT DELETE EDL PIPELINE/process_mbi_market_breadth.py:80-95