Skew Weighted Average Price (SWAP) calculates a skew-weighted average price for nuanced analysis of price dynamics and potential trading opportunities.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
52 lines of Pine Script v5 from Skew-Weighted-Avg-Price-SWAP.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.
The script determines skew by comparing smoothed positive and negative true ranges derived from price direction changes. Based on whether the skew exceeds a high threshold or falls below a low threshold, SWAP is assigned the high, low, or close price. It then plots the SWAP value and surrounding high and low bands representing a user-defined percentage range around it on the price chart. Users can modify the high and low skew thresholds as well as the range percentage. The indicator draws directly on the price chart and offers insights into price behavior without generating buy or sell signals.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
High skew threshold
float
1.1
highSkewThreshold
Low skew threshold
float
1.05
lowSkewThreshold
Range around SWAP (%)
float
0.5
rangePercent
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Moon Dev Lunar Sniper is a multi-indicator overlay that scores confluence across fast and slow EMAs, RSI, MACD, DMI, and BB width to fire signals only when score meets the minimum threshold. It plots buy and sell signals on the price chart, highlights cosmic b
Self-Aware Trend System calculates volatility-adaptive ATR trailing bands using a Trend Quality Index engine that evaluates market efficiency, momentum persistence, and structural pivots. It plots adaptive trend bands and character-flip trend signals directly
Cerebr Wave is an overlay indicator that combines multi-timeframe Keltner Channels with a Wave Trend oscillator to analyze market structure and momentum. It calculates higher-timeframe and lower-timeframe Keltner Channels alongside Wave Trend crossover signals
Cyber HUD XAU is an overlay indicator designed for XAUUSD that combines trend, momentum, and volatility filters. It calculates fast and slow ATR ratios alongside local price ranges to detect consolidation and chop filter states. The script evaluates candle bod
This indicator plots multiple technical analysis components directly on the price chart, including a Nadaraya-Watson envelope, pivot-based trendlines, and a kernel regression oscillator. It also renders visual overlay panels for the Relative Strength Index and
This indicator overlays a linear regression channel on the price chart and resets it when RSI crosses user-defined overbought or oversold levels. It plots an optional central regression line plus upper and lower standard-deviation bands. RSI length, threshold