Overview
| Function | Description |
|---|---|
adx() | Average Directional Index - measures trend strength |
supertrend() | Trend-following indicator with dynamic support/resistance |
ichimoku() | Comprehensive trend analysis with multiple components |
adx()
Average Directional Index - measures trend strength regardless of direction.Signature
Parameters
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | OHLC data series |
period | number | Calculation period (default: 14) |
Returns
number - ADX value (0-100, higher = stronger trend)
Interpretation
| ADX Value | Trend Strength |
|---|---|
| 0-25 | Weak or no trend |
| 25-50 | Strong trend |
| 50-75 | Very strong trend |
| 75-100 | Extremely strong trend |
Example
supertrend()
Trend-following indicator that provides dynamic support and resistance levels.Signature
Parameters
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | OHLC data series |
period | number | ATR period (default: 10) |
multiplier | number | ATR multiplier (default: 3) |
Returns
[number, number] - [supertrend value, direction (1=bullish, -1=bearish)]
Example
ichimoku()
Ichimoku Cloud - comprehensive trend analysis system with multiple components.Signature
Parameters
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | OHLC data series |
conversionPeriod | number | Tenkan-sen period (default: 9) |
basePeriod | number | Kijun-sen period (default: 26) |
spanPeriod | number | Senkou Span B period (default: 52) |
Components
| Component | Description |
|---|---|
| Tenkan-sen | Conversion line (short-term trend) |
| Kijun-sen | Base line (medium-term trend) |
| Senkou Span A | Leading span A (cloud boundary) |
| Senkou Span B | Leading span B (cloud boundary) |
| Chikou Span | Lagging span |