Skip to content

Commit 8a98645

Browse files
authored
Merge pull request #30 from QuantForgeOrg/dev
Dev merge (v0.4.0)
2 parents cf6920d + a7efad4 commit 8a98645

File tree

74 files changed

+73702
-3567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+73702
-3567
lines changed

AGENTS.md

Lines changed: 250 additions & 1249 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Change Log
22

3+
## [0.4.0] - TBD - Request.security implementation and transpiler enhancements
4+
5+
### Added
6+
7+
- Full implementation of `request.security()` function with lookahead and gaps support
8+
- New TA methods: `obv`, `alma`, `macd`, `swma`, `vwap`
9+
- Architecture documentation for transpiler, runtime, and namespaces
10+
- Support for handling raw .pine.ts indicator code (without context function wrapper)
11+
- Ability to show original code lines in transpiled code as comments for debugging
12+
- Comprehensive unit tests for `request.security()` functionality
13+
14+
### Changed
15+
16+
- Restructured TA unit tests for better organization
17+
- Improved Series handling for better performance and reliability
18+
- Enhanced transpiler to handle implicit pine.ts imports and normalize native imports
19+
- Namespaces import harmonization across the codebase
20+
21+
### Fixed
22+
23+
- Critical recursion bug in `request.security()` implementation
24+
- Tuple return handling in functions
25+
- Property type check issues
26+
327
## [0.3.1] - 2025-11-26 - Code coverage
428

529
### Added

docs/api-coverage/ta.md

Lines changed: 117 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,120 @@ parent: API Coverage
66

77
## Technical Analysis
88

9-
| Function | Status |
10-
| ----------------- | ------ |
11-
| `ta.sma()` ||
12-
| `ta.ema()` ||
13-
| `ta.vwma()` ||
14-
| `ta.wma()` ||
15-
| `ta.hma()` ||
16-
| `ta.rma()` ||
17-
| `ta.change()` ||
18-
| `ta.rsi()` ||
19-
| `ta.atr()` ||
20-
| `ta.mom()` ||
21-
| `ta.roc()` ||
22-
| `ta.dev()` ||
23-
| `ta.variance()` ||
24-
| `ta.highest()` ||
25-
| `ta.lowest()` ||
26-
| `ta.median()` ||
27-
| `ta.stdev()` ||
28-
| `ta.crossover()` | ✔️ |
29-
| `ta.crossunder()` | ✔️ |
30-
| `ta.pivothigh()` | ✔️ |
31-
| `ta.pivotlow()` | ✔️ |
32-
| `ta.tema()` | ✔️ |
33-
| `ta.linreg()` | ✔️ |
34-
| `ta.tr()` | ✔️ |
35-
| `ta.supertrend()` | ✔️ |
9+
All functions listed below are verified to exist in Pine Script v5.
10+
11+
### Moving Averages
12+
13+
| Function | Status | Description |
14+
| ------------- | ------ | ---------------------------------------- |
15+
| `ta.sma()` || Simple Moving Average |
16+
| `ta.ema()` || Exponential Moving Average |
17+
| `ta.wma()` || Weighted Moving Average |
18+
| `ta.hma()` || Hull Moving Average |
19+
| `ta.rma()` || Rolling/Running Moving Average |
20+
| `ta.vwma()` || Volume Weighted Moving Average |
21+
| `ta.alma()` || Arnaud Legoux Moving Average |
22+
| `ta.linreg()` | ✔️ | Linear Regression |
23+
| `ta.swma()` || Symmetrically Weighted Moving Average |
24+
| `ta.vwap` || Volume Weighted Average Price (variable) |
25+
26+
### Oscillators & Momentum
27+
28+
| Function | Status | Description |
29+
| ------------- | ------ | ------------------------------------- |
30+
| `ta.rsi()` || Relative Strength Index |
31+
| `ta.change()` || Price Change |
32+
| `ta.mom()` || Momentum |
33+
| `ta.roc()` || Rate of Change |
34+
| `ta.macd()` || Moving Average Convergence Divergence |
35+
| `ta.stoch()` || Stochastic Oscillator |
36+
| `ta.cci()` || Commodity Channel Index |
37+
| `ta.mfi()` || Money Flow Index |
38+
| `ta.cmo()` || Chande Momentum Oscillator |
39+
| `ta.cog()` || Center of Gravity |
40+
| `ta.tsi()` || True Strength Index |
41+
| `ta.wpr()` || Williams %R |
42+
43+
### Volatility & Range
44+
45+
| Function | Status | Description |
46+
| --------------- | ------ | ----------------------- |
47+
| `ta.atr()` || Average True Range |
48+
| `ta.stdev()` || Standard Deviation |
49+
| `ta.variance()` || Variance |
50+
| `ta.dev()` || Mean Absolute Deviation |
51+
| `ta.tr` | ✔️ | True Range (variable) |
52+
| `ta.tr()` | ✔️ | True Range (function) |
53+
| `ta.bb()` || Bollinger Bands |
54+
| `ta.bbw()` || Bollinger Bands Width |
55+
| `ta.kc()` || Keltner Channels |
56+
| `ta.kcw()` || Keltner Channels Width |
57+
| `ta.range()` || Range |
58+
59+
### Trend Analysis
60+
61+
| Function | Status | Description |
62+
| ----------------- | ------ | ---------------------------------- |
63+
| `ta.crossover()` | ✔️ | Crossover Detection |
64+
| `ta.crossunder()` | ✔️ | Crossunder Detection |
65+
| `ta.cross()` || Cross Detection (either direction) |
66+
| `ta.rising()` || Rising Trend Detection |
67+
| `ta.falling()` || Falling Trend Detection |
68+
| `ta.dmi()` || Directional Movement Index |
69+
| `ta.supertrend()` | ✔️ | SuperTrend Indicator |
70+
| `ta.sar()` || Parabolic SAR |
71+
72+
### Volume Indicators
73+
74+
| Function | Status | Description |
75+
| ------------ | ------ | ------------------------------------------------------ |
76+
| `ta.obv` || On-Balance Volume (variable) |
77+
| `ta.pvt` || Price-Volume Trend (variable) |
78+
| `ta.wad` || Williams Accumulation/Distribution (variable) |
79+
| `ta.wvad` || Williams Variable Accumulation/Distribution (variable) |
80+
| `ta.accdist` || Accumulation/Distribution (variable) |
81+
| `ta.nvi` || Negative Volume Index (variable) |
82+
| `ta.pvi` || Positive Volume Index (variable) |
83+
| `ta.iii` || Intraday Intensity Index (variable) |
84+
85+
### Statistical Functions
86+
87+
| Function | Status | Description |
88+
| -------------------------------------- | ------ | ------------------------- |
89+
| `ta.highest()` || Highest Value |
90+
| `ta.lowest()` || Lowest Value |
91+
| `ta.median()` || Median Value |
92+
| `ta.mode()` || Mode Value |
93+
| `ta.highestbars()` || Bars Since Highest |
94+
| `ta.lowestbars()` || Bars Since Lowest |
95+
| `ta.percentrank()` || Percentile Rank |
96+
| `ta.percentile_linear_interpolation()` || Percentile (Linear) |
97+
| `ta.percentile_nearest_rank()` || Percentile (Nearest Rank) |
98+
| `ta.correlation()` || Correlation Coefficient |
99+
| `ta.covariance()` || Covariance |
100+
101+
### Support & Resistance
102+
103+
| Function | Status | Description |
104+
| ---------------- | ------ | -------------------- |
105+
| `ta.pivothigh()` | ✔️ | Pivot High Detection |
106+
| `ta.pivotlow()` | ✔️ | Pivot Low Detection |
107+
108+
### Utility Functions
109+
110+
| Function | Status | Description |
111+
| ---------------- | ------ | ------------------------ |
112+
| `ta.valuewhen()` || Value When Condition Met |
113+
| `ta.barssince()` || Bars Since Condition |
114+
| `ta.cum()` || Cumulative Sum |
115+
116+
### Legend
117+
118+
- ✅ Fully implemented and tested
119+
- ✔️ Implemented (may need more testing)
120+
- ⬜ Not yet implemented
121+
122+
### Notes
123+
124+
- Some indicators exist as both variables and functions (e.g., `ta.vwap`, `ta.tr`)
125+
- `ta.adx()` is **not** a standalone function in Pine Script v5 (it's part of `ta.dmi()`)

0 commit comments

Comments
 (0)