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
View File
@@ -172,6 +172,7 @@ Price envelope and boundary indicators for breakout and mean-reversion strategie
| [**PCHANNEL**](../lib/channels/pchannel/pchannel.md) | Price Channel | Highest high / lowest low; identical to Donchian |
| [**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**](../lib/channels/starchannel/starchannel.md) | Stoller Average Range Channel | SMA with ATR bands; similar to Keltner but uses SMA |
### Statistics