Support & Resistance Calculator
Type:
support_resistance• Category:flow• Tags:technical analysis,trading,support,resistance,pivot points,fibonacci,retracement,camarilla,woodie,donchian,psychological levels
Description
Calculate support and resistance levels using technical analysis methods
Parameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
rowsExpr | string | Expr -> list[dict] (each dict contains OHLC data) | no | |
open | string | Open price column | no | |
close | string | Close price column | no | |
high | string | High price column | no | |
low | string | Low price column | no | |
methods | string | Methods to use for S/R calculation | no | ["ta_extrema","fibonacci_retracement"] |
lookback_period | number | Lookback period for fibonacci retracement and swing analysis | no | 20 |
order | number | Extrema sensitivity: number of bars on each side (argrelextrema order) | no | 5 |
atr_mult | number | Clustering tolerance multiplier relative to ATR | no | 1 |
top_n | number | Maximum number of support/resistance levels to return | no | 5 |
lookback_bars | number | If >0, use only the most recent N bars for extrema clustering | no | 0 |
strict_side | boolean | If true, keep supports <= current price and resistances >= current price | no | false |
max_distance_atr | number | If >0, filter levels to within N * ATR of current price | no | 0 |
nearest_only | boolean | If true, reduce to the single nearest support and resistance | no | false |
fib_ext_ratios | string | Comma-separated Fibonacci extension ratios (used by fibonacci_extensions) | no | "1.272,1.618,2.0,2.618" |
channel_length | number | Lookback length for price channels (Donchian) | no | 20 |
swing_top_n | number | How many recent swing highs/lows to include | no | 5 |
psych_step | number | Step for psychological levels; 0 = auto | no | 0 |
psych_count | number | Number of steps per side for psychological levels | no | 5 |
Help
Calculate key support and resistance levels for technical analysis.
Available Methods:
pivot_points: Classic pivot point calculation with S1-S3 and R1-R3 levelspivot_woodie: Woodie pivot pointspivot_camarilla: Camarilla pivot points (S1-S4/R1-R4)fibonacci_retracement: Fibonacci retracement levels (0.236, 0.382, 0.5, 0.618, 0.786)fibonacci_extensions: Fibonacci extension targets (1.272, 1.618, 2.0, 2.618)recent_levels: Recent swing highs/lows as support/resistanceswing_points: Output last swing highs and lows directlyprice_channels: Donchian price channels (upper/lower/mid)psychological_levels: Round-number levels around price
Input Data Format: Provide data expression that returns list of records with OHLC columns. Use the column selectors below to map your data fields.
How to Use:
1. Data Source:
- Set
rowsExprto an expression that returns list of records (e.g., from previous workflow steps) - Example:
data.fred_dataorvars.my_ohlc_data
2. Column Mapping:
- Select which columns contain Open, High, Low, Close data
- The dropdowns will show available columns from your data
3. Analysis Methods:
- Choose calculation methods (pivot points, fibonacci, recent levels)
- Each method provides different types of support/resistance levels
4. Classic Pivot Points:
- Uses last candle OHLC for calculation
- Provides S1-S3 support and R1-R3 resistance levels
5. Fibonacci Retracement:
- Calculates levels based on recent high-low range (using lookback_period)
- Levels: 23.6%, 38.2%, 50%, 61.8%, 78.6% from recent high
- Powerful tool for identifying potential reversal zones
3. Recent Swing Levels:
- Finds local highs/lows in recent data
- Based on swing analysis (local maxima/minima)
- Shows where price has reversed recently
Parameters:
- rowsExpr: Expression returning list of records with OHLC data
- open/high/low/close: Column selectors for OHLC data (auto-populated from rowsExpr)
- methods: Calculation methods (default: ["ta_extrema", "fibonacci_retracement"])
- lookback_period: Lookback period for fibonacci retracement and swing analysis (default: 20)
- fib_ext_ratios: Comma-separated extension ratios for Fibonacci extensions (default: 1.272,1.618,2.0,2.618)
- channel_length: Period for price channels/Donchian (default: 20)
- swing_top_n: How many recent swing highs/lows to include (default: 5)
- psych_step: Step for psychological levels; 0 or empty = auto (default: auto)
- psych_count: Number of steps per side around price for psychological levels (default: 5)
Output:
- support_levels: Dict of support levels with level names as keys and values as level prices
- resistance_levels: Dict of resistance levels with level names as keys and values as level prices
- nearest_support/resistance: Closest level values to current price
- price_position: Relative position between nearest S/R (0-1 scale)
- current_price: Last close price for reference
Tips:
- Combine multiple methods for stronger signals
- Use longer timeframes for more reliable levels
- Pivot points work best on daily/weekly charts
- Moving averages work on all timeframes
- Recent levels are timeframe-specific
Trading Applications:
- Entry/exit signals at S/R levels
- Stop loss placement below support/above resistance
- Target setting at next S/R level
- Trend identification using MA slopes