@devanshhq/indica 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pm/indica-research-report.md +390 -0
- package/ARCHITECTURE.md +470 -0
- package/Cargo.lock +1 -1
- package/Cargo.toml +2 -2
- package/README.md +98 -109
- package/package.json +2 -2
- package/src/batch/compute.rs +165 -0
- package/src/batch/mod.rs +2 -0
- package/src/batch/screen.rs +176 -0
- package/src/core/mod.rs +3 -0
- package/src/core/traits.rs +37 -0
- package/src/core/types.rs +22 -0
- package/src/core/utils.rs +43 -0
- package/src/indicators/india/circuit.rs +101 -0
- package/src/indicators/india/delivery.rs +116 -0
- package/src/indicators/india/mod.rs +2 -0
- package/src/indicators/mod.rs +6 -0
- package/src/indicators/momentum/macd.rs +123 -0
- package/src/indicators/momentum/mod.rs +3 -0
- package/src/indicators/momentum/rsi.rs +130 -0
- package/src/indicators/momentum/stochastic.rs +99 -0
- package/src/indicators/support_resistance/mod.rs +1 -0
- package/src/indicators/support_resistance/pivot.rs +40 -0
- package/src/indicators/trend/adx.rs +168 -0
- package/src/indicators/trend/ema.rs +110 -0
- package/src/indicators/trend/mod.rs +4 -0
- package/src/indicators/trend/sma.rs +75 -0
- package/src/indicators/trend/supertrend.rs +193 -0
- package/src/indicators/volatility/atr.rs +51 -0
- package/src/{bollinger.rs → indicators/volatility/bollinger.rs} +6 -22
- package/src/indicators/volatility/mod.rs +2 -0
- package/src/indicators/volume/mod.rs +3 -0
- package/src/indicators/volume/obv.rs +44 -0
- package/src/{volume.rs → indicators/volume/volume_trend.rs} +9 -27
- package/src/indicators/volume/vwap.rs +53 -0
- package/src/lib.rs +71 -21
- package/src/signals/engine.rs +139 -0
- package/src/signals/mod.rs +4 -0
- package/src/signals/presets.rs +109 -0
- package/src/signals/rules.rs +333 -0
- package/src/signals/types.rs +50 -0
- package/index.d.ts +0 -66
- package/indica.node +0 -0
- package/src/atr.rs +0 -66
- package/src/batch.rs +0 -139
- package/src/macd.rs +0 -132
- package/src/moving_avg.rs +0 -71
- package/src/napi_bindings.rs +0 -166
- package/src/pivot.rs +0 -58
- package/src/relative_strength.rs +0 -67
- package/src/rsi.rs +0 -74
- package/src/utils.rs +0 -17
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
# indica -- Research Report: What Would Make This Library Stand Out
|
|
2
|
+
|
|
3
|
+
**Date**: 2026-04-06
|
|
4
|
+
**Current State**: SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Pivot Points, Volume Trend, Relative Strength + Rayon batch + NAPI-RS bindings
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Competitive Landscape: Rust TA Libraries
|
|
9
|
+
|
|
10
|
+
### ta-rs (crate: `ta`)
|
|
11
|
+
- **GitHub**: 842 stars | **Downloads**: 213,806 total, ~33K recent
|
|
12
|
+
- **Last updated**: June 2021 (effectively abandoned)
|
|
13
|
+
- **Indicators**: EMA, SMA, RSI, Fast/Slow Stochastic, MACD, PPO, CCI, MFI, True Range, ATR, SD, MAD, Efficiency Ratio, Bollinger Bands, Chandelier Exit, Keltner Channel, ROC, OBV, Min, Max
|
|
14
|
+
- **Architecture**: Streaming/incremental via `Next<T>` trait -- feed one value, get one value back. This is the gold standard pattern.
|
|
15
|
+
- **Key strength**: Clean trait-based API, streaming by design
|
|
16
|
+
- **Key weakness**: Abandoned for 5 years, limited indicator count (~20), no WASM, no batch
|
|
17
|
+
|
|
18
|
+
### yata (crate: `yata`)
|
|
19
|
+
- **GitHub**: 390 stars | **Downloads**: 179,046 total, ~10K recent
|
|
20
|
+
- **Last updated**: March 2024 (slow)
|
|
21
|
+
- **Indicators**: 30+ including Ichimoku Cloud, Parabolic SAR, KAMA, Fisher Transform, Awesome Oscillator, Chaikin Money Flow, Elders Force Index, Know Sure Thing + 15 moving average types
|
|
22
|
+
- **Architecture**: Configurable numeric types (f32/f64), Heikin Ashi + Renko conversions, serde support
|
|
23
|
+
- **Key strength**: Broadest indicator coverage in Rust, timeframe collapsing
|
|
24
|
+
- **Key weakness**: Benchmarks show 3-125 ns/iter (fast), but no streaming API, no WASM, no language bindings
|
|
25
|
+
|
|
26
|
+
### kand (crate: `kand`)
|
|
27
|
+
- **GitHub**: 539 stars | **Downloads**: 13,119 total, ~2K recent
|
|
28
|
+
- **Last updated**: March 2025 (active)
|
|
29
|
+
- **Indicators**: 60+ including ADX, Supertrend, VWAP, Vegas, Aroon, SAR, Stochastic, Williams %R, DEMA, TEMA, T3, candlestick patterns (Doji, Hammer, Marubozu), plus planned statistical indicators (Sharpe, Sortino, Calmar, Kelly criterion)
|
|
30
|
+
- **Architecture**: O(1) incremental updates (`ema_inc()` pattern), PyO3 Python bindings, WASM bindings, both f32 and f64, Result-based error handling, mutable buffer outputs for zero-alloc
|
|
31
|
+
- **Key strength**: Most modern, broadest feature set, multi-language, incremental design
|
|
32
|
+
- **Key weakness**: Very new, unstable API, heavy scope creep risk
|
|
33
|
+
|
|
34
|
+
### Summary: Where indica Sits
|
|
35
|
+
|
|
36
|
+
| Feature | ta-rs | yata | kand | indica (current) |
|
|
37
|
+
|---------|-------|------|------|-------------------|
|
|
38
|
+
| Indicators | ~20 | 30+ | 60+ | 9 |
|
|
39
|
+
| Streaming/incremental | Yes | No | Partial | No |
|
|
40
|
+
| WASM | No | No | Yes | No |
|
|
41
|
+
| Python bindings | No | No | Yes | No |
|
|
42
|
+
| Node.js bindings | No | No | Yes (WASM) | Yes (NAPI-RS) |
|
|
43
|
+
| Batch parallel | No | No | No | Yes (Rayon) |
|
|
44
|
+
| f32/f64 configurable | No | Yes | Yes | No |
|
|
45
|
+
| Signal generation | No | No | No | Partial (MACD crossover) |
|
|
46
|
+
| India-specific | No | No | No | No |
|
|
47
|
+
| Candlestick patterns | No | No | Yes | No |
|
|
48
|
+
| Serde support | Optional | Yes | No | No |
|
|
49
|
+
|
|
50
|
+
**The gap**: Nobody does India-specific indicators. Nobody combines batch parallel processing with streaming updates. Nobody generates actionable trading signals (just raw values). These are indica's opportunities.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 2. Most Requested Missing Indicators (Ranked by Demand)
|
|
55
|
+
|
|
56
|
+
Based on TradingView popularity, Reddit algotrading discussions, Zerodha/Indian trader usage, and what competing libraries offer:
|
|
57
|
+
|
|
58
|
+
### Tier 1: High demand, missing from indica, relatively easy to implement
|
|
59
|
+
|
|
60
|
+
1. **VWAP (Volume-Weighted Average Price)** -- The #1 institutional indicator. Resets daily. Formula: cumulative(price * volume) / cumulative(volume). Essential for intraday. Only kand has it in Rust.
|
|
61
|
+
|
|
62
|
+
2. **Supertrend** -- Massively popular in India specifically (Zerodha made it famous). Uses ATR + multiplier. You already have ATR, so this is straightforward. Default: period=7, multiplier=3. Generates direct buy/sell signals.
|
|
63
|
+
|
|
64
|
+
3. **Stochastic Oscillator (Fast + Slow)** -- Classic overbought/oversold. ta-rs has it, kand has it, yata has it. You don't. Formula needs high/low/close.
|
|
65
|
+
|
|
66
|
+
4. **ADX (Average Directional Index)** -- Measures trend strength (not direction). Values >25 = strong trend, <20 = weak. Pairs perfectly with Supertrend. Requires +DI/-DI computation.
|
|
67
|
+
|
|
68
|
+
5. **OBV (On-Balance Volume)** -- Simplest volume indicator: cumulative volume where up days add and down days subtract. Shows money flow before price moves.
|
|
69
|
+
|
|
70
|
+
### Tier 2: High demand, moderate complexity
|
|
71
|
+
|
|
72
|
+
6. **Ichimoku Cloud** -- Complete trading system in one indicator: Tenkan-sen, Kijun-sen, Senkou Span A/B, Chikou Span. Very popular with position traders. Complex but well-documented math.
|
|
73
|
+
|
|
74
|
+
7. **Parabolic SAR** -- Trailing stop indicator. Generates stop-loss levels automatically. Wilder's original.
|
|
75
|
+
|
|
76
|
+
8. **Williams %R** -- Similar to Stochastic but inverted scale. Quick to implement.
|
|
77
|
+
|
|
78
|
+
9. **CCI (Commodity Channel Index)** -- Mean-reversion indicator. Identifies cyclical turns.
|
|
79
|
+
|
|
80
|
+
10. **MFI (Money Flow Index)** -- "Volume-weighted RSI". Needs typical price + volume.
|
|
81
|
+
|
|
82
|
+
### Tier 3: Differentiating, less common in open-source
|
|
83
|
+
|
|
84
|
+
11. **Fibonacci Retracement Levels** -- Auto-detect swing high/low, compute 23.6%, 38.2%, 50%, 61.8%, 78.6% levels. Most libraries skip this because it requires swing detection, not just math on a series.
|
|
85
|
+
|
|
86
|
+
12. **Keltner Channels** -- Like Bollinger but using ATR instead of standard deviation. You have ATR and EMA already.
|
|
87
|
+
|
|
88
|
+
13. **Donchian Channels** -- High/low over N periods. Simple but useful for breakout systems.
|
|
89
|
+
|
|
90
|
+
14. **DEMA/TEMA** -- Double/Triple EMA. Reduces lag.
|
|
91
|
+
|
|
92
|
+
15. **Heikin Ashi candle transformation** -- Modified OHLC for smoother trends.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 3. India-Specific Features (Unique Differentiator -- Nobody Else Does This)
|
|
97
|
+
|
|
98
|
+
This is where indica can genuinely stand apart from every other TA library in any language.
|
|
99
|
+
|
|
100
|
+
### 3a. Delivery Volume Analysis
|
|
101
|
+
Indian exchanges (NSE/BSE) uniquely report delivery volume separately from total traded volume. This metric does not exist in US/EU markets.
|
|
102
|
+
|
|
103
|
+
- **Delivery Percentage Indicator**: `delivery_volume / total_volume * 100`. High delivery % (>60%) on an up day = genuine buying (not speculative). Low delivery % on a big move = likely reversal.
|
|
104
|
+
- **Delivery Volume Trend**: Compare 5-day avg delivery% vs 20-day avg. Rising delivery% in uptrend = strong conviction.
|
|
105
|
+
- **Delivery-Adjusted OBV**: Weight OBV by delivery percentage instead of raw volume. More meaningful for Indian stocks.
|
|
106
|
+
|
|
107
|
+
### 3b. FII/DII Flow Indicators
|
|
108
|
+
Foreign Institutional Investors and Domestic Institutional Investors publish daily net buy/sell data. No TA library computes indicators on this.
|
|
109
|
+
|
|
110
|
+
- **FII Flow Momentum**: Running sum of FII net purchases over N days. Positive = bullish institutional flow.
|
|
111
|
+
- **FII-DII Divergence**: When FII sells but DII buys aggressively, historically marks bottoms.
|
|
112
|
+
- **Market Strength Score**: Aggregate FII Cash + DII Absorption + Net Liquidity into 0-100 score. <30 = bear regime, >60 = bull regime.
|
|
113
|
+
|
|
114
|
+
### 3c. Circuit Limit Detection
|
|
115
|
+
Indian stocks have daily circuit limits (2%, 5%, 10%, 20%) that halt trading. No other TA library handles this.
|
|
116
|
+
|
|
117
|
+
- **Circuit Proximity Indicator**: How close is current price to upper/lower circuit? Expressed as percentage.
|
|
118
|
+
- **Circuit Hit Counter**: Count of circuit hits in last N days. Stocks hitting upper circuits repeatedly = strong momentum or illiquidity risk.
|
|
119
|
+
- **Circuit-Adjusted ATR**: ATR calculation that accounts for truncated trading days when circuits are hit.
|
|
120
|
+
|
|
121
|
+
### 3d. Market Session Awareness
|
|
122
|
+
- **Pre-open auction detection**: NSE has a 9:00-9:15 pre-open session with different dynamics.
|
|
123
|
+
- **Muhurat Trading flag**: Special Diwali trading session (1 hour). Historically bullish bias.
|
|
124
|
+
|
|
125
|
+
### Impact Assessment
|
|
126
|
+
These India-specific features would make indica the **only** technical analysis library in any language that understands Indian market microstructure. This is a genuine moat. A Rust library with "built for Indian markets" positioning and Zerodha/Kite integration examples would attract significant attention from the Indian algotrading community.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 4. Architecture Improvements (Ranked by Impact)
|
|
131
|
+
|
|
132
|
+
### 4a. Streaming/Incremental API (HIGH IMPACT)
|
|
133
|
+
|
|
134
|
+
This is the single most important architectural upgrade. Every serious competitor (ta-rs, kand, trading-signals) has this or is building it.
|
|
135
|
+
|
|
136
|
+
**Current problem**: Every indica function recomputes from scratch. To update RSI with one new candle, you re-process all 250 candles. In a real-time system processing ticks for 2,000 stocks, this is O(n) per tick per stock.
|
|
137
|
+
|
|
138
|
+
**Proposed design** -- trait-based streaming:
|
|
139
|
+
|
|
140
|
+
```rust
|
|
141
|
+
pub trait Indicator {
|
|
142
|
+
type Output;
|
|
143
|
+
/// Feed one new value, get updated result
|
|
144
|
+
fn update(&mut self, value: f64) -> Self::Output;
|
|
145
|
+
/// Reset state
|
|
146
|
+
fn reset(&mut self);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Usage:
|
|
150
|
+
let mut rsi = Rsi::new(14);
|
|
151
|
+
for candle in historical_data {
|
|
152
|
+
let value = rsi.update(candle.close);
|
|
153
|
+
}
|
|
154
|
+
// New tick arrives -- O(1) update
|
|
155
|
+
let current_rsi = rsi.update(new_close);
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Keep the existing batch functions** as convenience wrappers that create an indicator, feed all data, return the final value. This preserves backward compatibility while adding streaming.
|
|
159
|
+
|
|
160
|
+
**Priority**: Do this BEFORE adding more indicators. It changes the internal architecture of every indicator.
|
|
161
|
+
|
|
162
|
+
### 4b. WASM Compilation (MEDIUM-HIGH IMPACT)
|
|
163
|
+
|
|
164
|
+
kand already has this. The value proposition is massive:
|
|
165
|
+
- Run TA calculations in the browser (TradingView-like charting apps)
|
|
166
|
+
- No server round-trip for indicator computation
|
|
167
|
+
- Works with any JS framework (React, Vue, etc.)
|
|
168
|
+
|
|
169
|
+
**Implementation path**:
|
|
170
|
+
1. Feature-gate NAPI-RS behind `#[cfg(feature = "napi")]`
|
|
171
|
+
2. Add `wasm-bindgen` behind `#[cfg(feature = "wasm")]`
|
|
172
|
+
3. Compile with `wasm-pack build --target web`
|
|
173
|
+
4. Publish to npm as `@devanshhq/indica-wasm`
|
|
174
|
+
|
|
175
|
+
**Blocker**: Rayon does not work in WASM. Batch parallel must be feature-gated separately. Single-stock indicators work fine in WASM.
|
|
176
|
+
|
|
177
|
+
### 4c. Signal Generation Layer (HIGH IMPACT, Unique Differentiator)
|
|
178
|
+
|
|
179
|
+
No Rust TA library generates actionable signals. They all return raw numbers (RSI = 67.3) and leave interpretation to the user. This is the biggest gap in the entire ecosystem.
|
|
180
|
+
|
|
181
|
+
**Proposed design**:
|
|
182
|
+
|
|
183
|
+
```rust
|
|
184
|
+
pub enum Signal {
|
|
185
|
+
StrongBuy,
|
|
186
|
+
Buy,
|
|
187
|
+
Neutral,
|
|
188
|
+
Sell,
|
|
189
|
+
StrongSell,
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
pub struct SignalResult {
|
|
193
|
+
pub signal: Signal,
|
|
194
|
+
pub confidence: f64, // 0.0 to 1.0
|
|
195
|
+
pub reason: &'static str, // "RSI oversold + MACD bullish crossover"
|
|
196
|
+
pub stop_loss: Option<f64>,
|
|
197
|
+
pub target: Option<f64>,
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Composite signal from multiple indicators
|
|
201
|
+
pub fn generate_signal(snapshot: &IndicatorSnapshot) -> SignalResult;
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
This bridges the gap between "library for quants" and "library for traders." Most Indian retail traders on Zerodha want signals, not raw indicator values.
|
|
205
|
+
|
|
206
|
+
### 4d. Configurable Precision (LOW-MEDIUM IMPACT)
|
|
207
|
+
|
|
208
|
+
Both yata and kand support f32/f64. For batch processing 2,000+ stocks, f32 halves memory and can be faster with SIMD.
|
|
209
|
+
|
|
210
|
+
**Implementation**: Use a generic parameter `T: Float` trait bound, or simpler: a feature flag that switches the internal type.
|
|
211
|
+
|
|
212
|
+
### 4e. Serde Serialization (LOW IMPACT, Easy Win)
|
|
213
|
+
|
|
214
|
+
Add `#[derive(Serialize, Deserialize)]` to all result structs behind a `serde` feature flag. Lets users cache/persist indicator state. Both ta-rs and yata have this.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## 5. What Makes TA Libraries Succeed
|
|
219
|
+
|
|
220
|
+
### Download/star comparison across ecosystems:
|
|
221
|
+
|
|
222
|
+
| Library | Language | Stars | Downloads | Key Success Factor |
|
|
223
|
+
|---------|----------|-------|-----------|-------------------|
|
|
224
|
+
| TA-Lib | C/Python | 10K+ | Millions | First mover, 150+ indicators, C performance |
|
|
225
|
+
| pandas-ta | Python | 5K+ | 30K/week | Pandas integration, 130+ indicators, easy API |
|
|
226
|
+
| ta-rs | Rust | 842 | 214K | Clean trait API, first Rust TA lib |
|
|
227
|
+
| trading-signals | JS/TS | 800+ | High | Streaming design, TypeScript types, active maintenance |
|
|
228
|
+
| tulip-indicators | C | 800+ | Moderate | Pure C, zero dependencies, embeddable |
|
|
229
|
+
| yata | Rust | 390 | 179K | Broad indicator coverage |
|
|
230
|
+
| kand | Rust | 539 | 13K | Modern design, multi-language |
|
|
231
|
+
|
|
232
|
+
### Patterns of success:
|
|
233
|
+
|
|
234
|
+
1. **Comprehensive indicator count matters** -- TA-Lib and pandas-ta dominate because they have 130-150+ indicators. Developers choose the library that has everything they need so they don't have to mix libraries.
|
|
235
|
+
|
|
236
|
+
2. **Clean, consistent API** -- ta-rs succeeded despite having fewer indicators because its `Next` trait is elegant. Every indicator works the same way.
|
|
237
|
+
|
|
238
|
+
3. **Ecosystem integration** -- pandas-ta wins in Python because it extends DataFrame. trading-signals wins in JS because it's TypeScript-first with streaming.
|
|
239
|
+
|
|
240
|
+
4. **Documentation with real examples** -- Successful libraries have examples showing real trading strategies, not just API reference. Benchmarks against alternatives are table stakes.
|
|
241
|
+
|
|
242
|
+
5. **Active maintenance** -- ta-rs downloads are declining because it's abandoned. Users don't trust unmaintained financial libraries.
|
|
243
|
+
|
|
244
|
+
6. **Performance claims with benchmarks** -- Every successful library publishes benchmarks. indica's "2,000 stocks in 6ms" claim is excellent -- lean into this harder.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 6. Real-World Usage Patterns
|
|
249
|
+
|
|
250
|
+
### How quant/algo traders actually use TA libraries:
|
|
251
|
+
|
|
252
|
+
**Pattern 1: Screening pipeline** (indica already nails this)
|
|
253
|
+
```
|
|
254
|
+
Load 2,000 stocks -> Compute all indicators -> Filter by criteria -> Return candidates
|
|
255
|
+
```
|
|
256
|
+
This is indica's strongest use case. Rayon parallelism is the right approach.
|
|
257
|
+
|
|
258
|
+
**Pattern 2: Real-time monitoring** (indica cannot do this yet)
|
|
259
|
+
```
|
|
260
|
+
WebSocket tick arrives -> Update indicator state -> Check signal conditions -> Alert
|
|
261
|
+
```
|
|
262
|
+
Requires streaming/incremental API. Currently impossible without recomputing everything.
|
|
263
|
+
|
|
264
|
+
**Pattern 3: Backtesting** (indica partially supports this)
|
|
265
|
+
```
|
|
266
|
+
For each historical day:
|
|
267
|
+
Compute indicators at that point in time
|
|
268
|
+
Apply strategy rules
|
|
269
|
+
Track positions and P&L
|
|
270
|
+
```
|
|
271
|
+
Requires either: (a) full series output (all 250 RSI values, not just the latest), or (b) streaming API that can replay history. indica currently returns only the final value.
|
|
272
|
+
|
|
273
|
+
**Pattern 4: Strategy composition** (indica cannot do this)
|
|
274
|
+
```
|
|
275
|
+
Buy when: RSI < 30 AND MACD bullish crossover AND price > SMA(200)
|
|
276
|
+
Sell when: RSI > 70 OR price < SMA(50)
|
|
277
|
+
```
|
|
278
|
+
Requires a signal/strategy layer that combines multiple indicators.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## 7. Actionable Recommendations (Ranked by Impact)
|
|
283
|
+
|
|
284
|
+
### Phase 1: Architecture Foundation (Do First)
|
|
285
|
+
|
|
286
|
+
**1. Add streaming/incremental API via trait system**
|
|
287
|
+
- Impact: CRITICAL. Unlocks real-time use cases, backtesting, and makes every future indicator automatically streamable.
|
|
288
|
+
- Effort: Medium (refactor internals of each existing indicator to maintain state)
|
|
289
|
+
- Keep existing batch functions as wrappers.
|
|
290
|
+
|
|
291
|
+
**2. Return full series, not just final value**
|
|
292
|
+
- Impact: HIGH. Unlocks backtesting and charting.
|
|
293
|
+
- Change `rsi(&closes, 14) -> Option<f64>` to also offer `rsi_series(&closes, 14) -> Option<Vec<f64>>`.
|
|
294
|
+
- You already have `ema_series` internally -- expose this pattern for all indicators.
|
|
295
|
+
|
|
296
|
+
### Phase 2: High-Value Indicators (Do Second)
|
|
297
|
+
|
|
298
|
+
**3. Add Supertrend**
|
|
299
|
+
- Impact: HIGH for Indian market positioning. Most requested indicator in Indian trading communities. You already have ATR. Generates buy/sell signals inherently.
|
|
300
|
+
|
|
301
|
+
**4. Add VWAP**
|
|
302
|
+
- Impact: HIGH. #1 institutional indicator. Simple math. Needs session-reset awareness.
|
|
303
|
+
|
|
304
|
+
**5. Add Stochastic Oscillator**
|
|
305
|
+
- Impact: HIGH. Expected by every serious trader. Missing from indica is conspicuous.
|
|
306
|
+
|
|
307
|
+
**6. Add ADX (+DI/-DI)**
|
|
308
|
+
- Impact: HIGH. Pairs with Supertrend for trend strength confirmation. Universal indicator.
|
|
309
|
+
|
|
310
|
+
**7. Add OBV**
|
|
311
|
+
- Impact: MEDIUM-HIGH. Simplest volume indicator. 10 lines of code. No excuse not to have it.
|
|
312
|
+
|
|
313
|
+
### Phase 3: India-Specific Moat (Do Third -- This Is The Differentiator)
|
|
314
|
+
|
|
315
|
+
**8. Delivery Volume indicators**
|
|
316
|
+
- Impact: VERY HIGH for positioning. No other library in any language does this.
|
|
317
|
+
- `delivery_percentage()`, `delivery_trend()`, `delivery_adjusted_obv()`
|
|
318
|
+
|
|
319
|
+
**9. Circuit limit detection**
|
|
320
|
+
- Impact: HIGH for Indian traders. Unique feature.
|
|
321
|
+
- `circuit_proximity()`, `circuit_hit_count()`
|
|
322
|
+
|
|
323
|
+
**10. FII/DII flow indicators**
|
|
324
|
+
- Impact: MEDIUM-HIGH. Requires external data but the computation layer is valuable.
|
|
325
|
+
|
|
326
|
+
### Phase 4: Platform Expansion
|
|
327
|
+
|
|
328
|
+
**11. WASM compilation**
|
|
329
|
+
- Impact: HIGH. Opens browser use case. Feature-gate NAPI-RS and Rayon.
|
|
330
|
+
- Publish as separate npm package `@devanshhq/indica-wasm`.
|
|
331
|
+
|
|
332
|
+
**12. Signal generation layer**
|
|
333
|
+
- Impact: HIGH. Goes from "indicator library" to "trading intelligence library."
|
|
334
|
+
- Composite signals from multiple indicators with confidence scoring.
|
|
335
|
+
|
|
336
|
+
### Phase 5: Completeness
|
|
337
|
+
|
|
338
|
+
**13. Add remaining standard indicators**: Ichimoku Cloud, Parabolic SAR, Williams %R, CCI, MFI, Keltner Channels, DEMA/TEMA, Fibonacci levels, Heikin Ashi
|
|
339
|
+
- Impact: MEDIUM. Completeness matters for adoption.
|
|
340
|
+
|
|
341
|
+
**14. Candlestick pattern recognition**: Doji, Hammer, Engulfing, Morning Star, etc.
|
|
342
|
+
- Impact: MEDIUM. kand has this. Popular with manual traders.
|
|
343
|
+
|
|
344
|
+
**15. Serde support + configurable precision (f32/f64)**
|
|
345
|
+
- Impact: LOW-MEDIUM. Easy wins for ecosystem integration.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## 8. Positioning Strategy
|
|
350
|
+
|
|
351
|
+
### What indica should NOT try to be:
|
|
352
|
+
- Another "TA-Lib but in Rust" (kand is already doing this)
|
|
353
|
+
- The library with the most indicators (kand has 60+, you can't catch up)
|
|
354
|
+
|
|
355
|
+
### What indica SHOULD be:
|
|
356
|
+
|
|
357
|
+
**"The fast, opinionated TA library built for Indian stock markets. Screening to signals."**
|
|
358
|
+
|
|
359
|
+
1. **Speed story**: 2,000 stocks in 6ms. Keep this front and center. Benchmark against ta-rs, kand, yata.
|
|
360
|
+
2. **India-first**: Delivery volume, circuit limits, FII/DII -- features nobody else has.
|
|
361
|
+
3. **Signals, not just numbers**: Go beyond raw indicator values to actionable buy/sell signals.
|
|
362
|
+
4. **Dual-mode**: Batch screening (Rayon) + real-time streaming. Cover both use cases.
|
|
363
|
+
5. **Multi-platform**: Rust + Node.js (NAPI-RS) + Browser (WASM). Run anywhere.
|
|
364
|
+
6. **Metis integration story**: Dog-food it in a real product. Show real-world usage.
|
|
365
|
+
|
|
366
|
+
### Tagline options:
|
|
367
|
+
- "Technical analysis for Indian markets. Fast."
|
|
368
|
+
- "From screening to signals. In Rust."
|
|
369
|
+
- "2,000 stocks. 6ms. Built for Indian traders."
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Sources
|
|
374
|
+
|
|
375
|
+
- [ta-rs GitHub](https://github.com/greyblake/ta-rs) -- 842 stars, streaming Next trait, last updated 2021
|
|
376
|
+
- [kand GitHub](https://github.com/kand-ta/kand) -- 539 stars, 60+ indicators, O(1) incremental, WASM + Python
|
|
377
|
+
- [yata GitHub](https://github.com/amv-dev/yata) -- 390 stars, 30+ indicators, configurable types
|
|
378
|
+
- [Zerodha Varsity: ADX, Supertrend, VWAP](https://zerodha.com/varsity/chapter/supplementary-notes-1/)
|
|
379
|
+
- [Zerodha: Delivery Volume on Kite](https://support.zerodha.com/category/trading-and-markets/general-kite/kite-mw/articles/delivery-volume-percentage-on-kite)
|
|
380
|
+
- [NSE: Circuit Breakers](https://www.nseindia.com/products-services/equity-market-circuit-breakers)
|
|
381
|
+
- [NSE: FII/DII Data](https://www.nseindia.com/reports/fii-dii)
|
|
382
|
+
- [TA-Lib](https://ta-lib.org/) -- 150+ indicators, C performance baseline
|
|
383
|
+
- [pandas-ta](https://www.pandas-ta.dev/) -- 130+ indicators, Python ecosystem leader
|
|
384
|
+
- [TradingView Community Scripts](https://www.tradingview.com/scripts/) -- 150K+ scripts, popularity signals
|
|
385
|
+
- [Research 360: Delivery Screener](https://www.research360.in/screeners/volume-and-delivery)
|
|
386
|
+
- [Best Indicators for Indian Swing Traders](https://www.gwcindia.in/blog/best-indicator-combinations-for-swing-traders-in-india/)
|
|
387
|
+
- [100 Best Trading Indicators 2026](https://www.quantifiedstrategies.com/trading-indicators/)
|
|
388
|
+
- [Supertrend Indicator Formula](https://www.tradingfuel.com/supertrend-indicator-formula-and-calculation/)
|
|
389
|
+
- [trading-signals npm](https://github.com/bennycode/trading-signals) -- streaming TA for TypeScript
|
|
390
|
+
- [Rust and WebAssembly](https://rustwasm.github.io/book/)
|