Add Starchannel indicator implementation and validation tests

- Implemented the Starchannel class, which calculates a volatility-based envelope using SMA as the middle line and ATR for band width.
- Added methods for updating the indicator with new data, batch calculations, and state management.
- Created comprehensive unit tests for the Starchannel indicator, validating various scenarios including manual calculations, consistency across modes, eventing, and handling of large datasets.
- Ensured that the indicator's outputs are finite and that band widths are consistent across different calculation modes.
This commit is contained in:
Miha Kralj
2026-01-21 17:21:29 -05:00
parent 470d2f0121
commit fdfbfd98f0
9 changed files with 1795 additions and 7 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ Channels define dynamic support and resistance. Upper band shows where price ten
| [PCHANNEL](lib/channels/pchannel/pchannel.md) | Price Channel | Highest high and lowest low. Identical to Donchian Channels. |
| [REGCHANNEL](lib/channels/regchannel/regchannel.md) | Linear Regression Channel | Linear regression line with standard deviation bands. |
| [SDCHANNEL](lib/channels/sdchannel/sdchannel.md) | Standard Deviation Channel | Moving average with standard deviation bands. |
| STARCHANNEL | Stoller Average Range Channel | ATR-based channel around moving average. Similar to Keltner. |
| [STARCHANNEL](lib/channels/starchannel/starchannel.md) | Stoller Average Range Channel | SMA with ATR bands. Similar to Keltner but uses SMA instead of EMA. |
| STBANDS | Super Trend Bands | ATR-based trend-following bands. Flips direction on breakout. |
| UBANDS | Ultimate Bands | Composite volatility bands using multiple measures. |
| UCHANNEL | Ultimate Channel | Adaptive channel using multiple volatility inputs. |