Study Reference
Available on: Web · iOS · Android
On this page
The scanner has 102 built-in studies in 9 groups. A study is a calculation on a stock's price or volume history, such as a moving average or RSI. Each entry gives the study's notation, the inputs it reads, and every setting with its default and allowed range. The settings carry the names the study editor shows.
Notation reads like a function call: SMA(c, period) is a simple moving average of the close over period bars. The glossary explains the shorthand under Notation.
Plans and lookback
Every plan can run every study. Free runs studies on the daily timeframe only. A study's lookback, the number of bars it reads, is capped by plan: 200 trading days on Free, 400 on Super, no cap on Super Pro. The cap counts trading days, so on a weekly timeframe Super can look back 80 bars. Some inputs need a paid plan; see Study inputs.
Overlap and moving averages
These studies sit on the price chart itself. Use them to read the direction of a trend and where price sits against it. 17 studies.
Bollinger Bands
Bollinger Bands are a technical indicator that plots two standard deviation bands around a moving average. The upper band is typically 2 standard deviations above the moving average, and the lower band is typically 2 standard deviations below the moving average. The middle band is typically the moving average.
BBANDS(c, period, nbdevup, nbdevdn, matype)
- Inputs:
cclose price - Settings:
- Period: default 10, 0 to 200
- NBDevUp: default 2, 0 to 200
- NBDevDn: default 2, 0 to 200
- MAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Outputs:
Upper,Middle,Lower
Double exponential moving average
A trend-following indicator that reduces lag inherent in traditional moving averages by using a calculation that subtracts a double-smoothed EMA from twice the single-smoothed EMA.
DEMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
DEMA
Exponential moving average
A trend-following indicator that gives more weight to recent prices, making it more responsive to new information than a simple moving average.
EMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
EMA
Hilbert Transform - Instantaneous Trendline
Uses Hilbert Transform to generate a trendline that adapts to the dominant cycle in the data, providing a smoothed representation of price trends.
HT_TRENDLINE(c)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
HT_TRENDLINE
Kaufman Adaptive Moving Average
An adaptive moving average that dynamically adjusts its responsiveness based on market efficiency, following prices closely during trending markets and adjusting during choppy periods.
KAMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
KAMA
MESA Adaptive Moving Average
An adaptive moving average that adjusts based on the rate of change of phase as measured by the Hilbert Transform, featuring fast attack and slow decay to reduce whipsaw trades.
MAMA(c, fastlimit, slowlimit)
- Inputs:
cclose price - Settings:
- FastLimit: default 0.5, 0.01 to 0.99
- SlowLimit: default 0.05, 0.01 to 0.99
- Outputs:
MAMA,FAMA
MidPoint over period
Calculates the midpoint between the highest and lowest values over a specified period, useful for identifying the center of price action.
MIDPOINT(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
MIDPOINT
Midpoint Price over period
Calculates the midpoint between the highest high and lowest low over a specified period, representing the middle of the price range.
MIDPRICE(h, l, period)
- Inputs:
hhigh price,llow price - Settings:
- Period: default 14, 0 to 200
- Output:
MIDPRICE
Moving average
A versatile moving average that can be configured to use different calculation methods (SMA, EMA, WMA, etc.) to smooth price data and identify trends.
MA(c, period, matype)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- MAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Output:
MA
Moving average with variable period
A moving average that allows for variable period lengths, adapting to market conditions by using different lookback periods over time. Takes more time to compute than other functions.
MAVP(c, periods, minperiod, maxperiod, matype)
- Inputs:
cclose price - Settings:
- Periods: default 9, 16, 28, 2 to 30
- MAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Output:
MAVP
Parabolic SAR
Parabolic Stop and Reverse indicator that provides potential reversal points, appearing as dots above or below price to indicate trend direction and potential exit points.
SAR(h, l, acceleration, maximum)
- Inputs:
hhigh price,llow price - Settings:
- Acceleration: default 0, 0 to 200
- Maximum: default 0, 0 to 200
- Output:
SAR
Parabolic SAR Extended params
An extended version of Parabolic SAR with separate acceleration parameters for long and short positions, allowing for asymmetric tuning of trend sensitivity.
SAREXT(h, l, ...)
- Inputs:
hhigh price,llow price - Settings:
- Startvalue: default 0, 0 to 200
- Offsetonreverse: default 0, 0 to 200
- Accelerationinitlong: default 0, 0 to 200
- Accelerationlong: default 0, 0 to 200
- Accelerationmaxlong: default 0, 0 to 200
- Accelerationinitshort: default 0, 0 to 200
- Accelerationshort: default 0, 0 to 200
- Accelerationmaxshort: default 0, 0 to 200
- Output:
SAREXT
Simple Moving Average
A simple average of prices over a specified period, giving equal weight to all values and commonly used to identify trend direction. DEPRECATED USAGE: SMA(fw_*, period=1) as an identity function to reach a raw feature-window column. It still works and existing saved scans are not broken, but it burns a talib dispatch per ticker to compute x -> x. Use the FeatureWindow scan category instead (ADR-0062), it compares the raw column directly and adds self-comparison across time, WithinAll, and the 3-way SessionZones control.
SMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 50, 0 to 200
- Output:
SMA
Triangular Moving Average
A double-smoothed simple moving average that places more weight on the middle portion of the data, resulting in a very smooth trendline with significant lag.
TRIMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
TRIMA
Triple Exponential Moving Average
A trend-following indicator that applies triple exponential smoothing to reduce lag even further than DEMA while maintaining responsiveness to price changes.
TEMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
TEMA
Triple Exponential Moving Average (T3)
A smoothed moving average that applies exponential smoothing multiple times with a volume factor, designed to reduce lag while maintaining smoothness.
T3(c, period, vfactor)
- Inputs:
cclose price - Settings:
- Period: default 5, 0 to 200
- Vfactor: default 0, 0 to 200
- Output:
T3
Weighted Moving Average
A moving average that assigns linearly increasing weight to more recent data, making it more responsive to price changes than a simple moving average.
WMA(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
WMA
Momentum studies
Momentum studies measure how fast and how far price is moving, to spot overbought and oversold stocks and turns in a trend. 30 studies.
1-day Rate-Of-Change (ROC) of a Triple Smooth EMA
Shows the rate of change of a triple exponentially smoothed moving average, filtering out market noise to show longer-term trend direction.
TRIX(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
TRIX
Absolute Price Oscillator
Displays the difference between two moving averages in absolute terms, useful for identifying momentum and potential trend changes.
APO(c, fastperiod, slowperiod, matype)
- Inputs:
cclose price - Settings:
- FastPeriod: default 12, 0 to 200
- SlowPeriod: default 26, 0 to 200
- MAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Output:
APO
Aroon
Identifies the time elapsed since the highest high and lowest low over a period, with Aroon Up and Aroon Down lines indicating uptrend and downtrend strength respectively.
AROON(h, l, period)
- Inputs:
hhigh price,llow price - Settings:
- Period: default 14, 0 to 200
- Outputs:
Down,Up
Aroon Oscillator
The difference between Aroon Up and Aroon Down, oscillating between -100 and 100 to indicate trend direction and strength.
AROONOSC(h, l, period)
- Inputs:
hhigh price,llow price - Settings:
- Period: default 14, 0 to 200
- Output:
AROONOSC - Values: -100 to 100
Average Directional Movement Index
Measures trend strength regardless of direction, with values above 25 indicating a strong trend and below 20 indicating a weak trend or ranging market.
ADX(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
ADX
Average Directional Movement Index Rating
A smoothed version of ADX that averages the current ADX with the ADX from a specified number of periods ago, providing a more stable trend strength measurement.
ADXR(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
ADXR
Balance Of Power
Measures the strength of buyers versus sellers by calculating where the close is relative to the range, with positive values indicating buyer dominance.
BOP(o, h, l, c)
- Inputs:
oopen price,hhigh price,llow price,cclose price - Settings: none
- Output:
BOP - Values: -1 to 1
Chande Momentum Oscillator
A momentum oscillator that measures the difference between the sum of gains and losses over a period, oscillating between -100 and +100.
CMO(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
CMO - Values: -100 to 100
Commodity Channel Index
Measures the deviation of price from its statistical mean, with values above +100 indicating overbought conditions and below -100 indicating oversold conditions.
CCI(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
CCI
Directional Movement Index
Measures the strength of directional movement by comparing positive and negative directional indicators, used as a component in calculating ADX.
DX(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
DX
MACD with controllable MA type
An extended version of MACD that allows customization of the moving average types for fast, slow, and signal lines.
MACDEXT(c, fastperiod, fastmatype, slowperiod, slowmatype, signalperiod, signalmatype)
- Inputs:
cclose price - Settings:
- FastPeriod: default 12, 0 to 200
- FastMAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- SlowPeriod: default 26, 0 to 200
- SlowMAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- SignalPeriod: default 9, 0 to 200
- SignalMAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Outputs:
MACDEXT,Signal,MACDEXTHist
Minus Directional Indicator
Measures downward price movement as part of the Directional Movement System, used with Plus DI to assess trend direction.
MINUS_DI(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
MINUS_DI
Minus Directional Movement
Calculates the smoothed difference between consecutive lows when the current low is lower than the previous low, indicating downward movement.
MINUS_DM(h, l, period)
- Inputs:
hhigh price,llow price - Settings:
- Period: default 14, 0 to 200
- Output:
MINUS_DM
Momentum
Calculates the difference between the current price and the price a specified number of periods ago, measuring the rate of price change.
MOM(c, period)
- Inputs:
cclose price - Settings:
- Period: default 10, 0 to 200
- Output:
MOM
Money Flow Index
A volume-weighted momentum indicator that measures buying and selling pressure, with values above 80 indicating overbought and below 20 indicating oversold.
MFI(h, l, c, v, period)
- Inputs:
hhigh price,llow price,cclose price,vvolume - Settings:
- Period: default 14, 0 to 200
- Output:
MFI - Values: 0 to 100
Moving Average Convergence/Divergence
Shows the relationship between two moving averages, consisting of the MACD line, signal line, and histogram to identify momentum and potential trend reversals.
MACD(c, fastperiod, slowperiod, signalperiod)
- Inputs:
cclose price - Settings:
- FastPeriod: default 12, 0 to 200
- SlowPeriod: default 26, 0 to 200
- SignalPeriod: default 9, 0 to 200
- Outputs:
MACD,Signal,MACDHist
Moving Average Convergence/Divergence Fix 12/26
MACD with fixed fast (12) and slow (26) periods, allowing only the signal period to be adjusted.
MACDFIX(c, signalperiod)
- Inputs:
cclose price - Settings:
- SignalPeriod: default 9, 0 to 200
- Outputs:
MACDFIX,Signal,MACDFIXHist
Percentage Price Oscillator
Similar to MACD but expressed as a percentage, making it easier to compare across securities with different price levels.
PPO(c, fastperiod, slowperiod, matype)
- Inputs:
cclose price - Settings:
- FastPeriod: default 12, 0 to 200
- SlowPeriod: default 26, 0 to 200
- MAType: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Output:
PPO
Plus Directional Indicator
Measures upward price movement as part of the Directional Movement System, used with Minus DI to assess trend direction.
PLUS_DI(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
PLUS_DI
Plus Directional Movement
Calculates the smoothed difference between consecutive highs when the current high is higher than the previous high, indicating upward movement.
PLUS_DM(h, l, period)
- Inputs:
hhigh price,llow price - Settings:
- Period: default 14, 0 to 200
- Output:
PLUS_DM
Rate of change
Measures the percentage change in price between the current price and the price n periods ago, used to identify momentum.
ROC(c, period)
- Inputs:
cclose price - Settings:
- Period: default 10, 0 to 200
- Output:
ROC
Rate of change Percentage
Calculates the rate of change as a decimal percentage, showing the proportion of change relative to the previous price.
ROCP(c, period)
- Inputs:
cclose price - Settings:
- Period: default 10, 0 to 200
- Output:
ROCP
Rate of change ratio
Calculates the rate of change as a ratio of current price to previous price, with values above 1 indicating upward movement.
ROCR(c, period)
- Inputs:
cclose price - Settings:
- Period: default 10, 0 to 200
- Output:
ROCR
Rate of change ratio 100 scale
Same as ROCR but scaled by 100, with values above 100 indicating upward movement and below 100 indicating downward movement.
ROCR100(c, period)
- Inputs:
cclose price - Settings:
- Period: default 10, 0 to 200
- Output:
ROCR100
Relative Strength Index
A momentum oscillator that measures the speed and magnitude of price changes, with values above 70 typically indicating overbought conditions and below 30 indicating oversold.
RSI(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
RSI - Values: 0 to 100
Stochastic
Compares the closing price to the price range over a period, generating %K and %D lines that oscillate between 0 and 100 to identify overbought and oversold levels.
STOCH(h, l, c, fastk_period, slowk_period, slowk_matype, slowd_period, slowd_matype)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Fastk_period: default 5, 0 to 200
- Slowk_period: default 3, 0 to 200
- Slowk_matype: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Slowd_period: default 3, 0 to 200
- Slowd_matype: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Outputs:
SlowK,SlowD - Values: 0 to 100
Stochastic Fast
A faster version of the Stochastic oscillator without additional smoothing, more sensitive to price changes and generating earlier signals.
STOCHF(h, l, c, fastk_period, fastd_period, fastd_matype)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Fastk_period: default 5, 0 to 200
- Fastd_period: default 3, 0 to 200
- Fastd_matype: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Outputs:
FastK,FastD - Values: 0 to 100
Stochastic Relative Strength Index
Applies the Stochastic formula to RSI values rather than price, creating a more sensitive oscillator that identifies overbought and oversold RSI levels.
STOCHRSI(c, period, fastk_period, fastd_period, fastd_matype)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Fastk_period: default 5, 0 to 200
- Fastd_period: default 3, 0 to 200
- Fastd_matype: default SMA; one of SMA, EMA, WMA, DEMA, TEMA, TRIMA, KAMA, MAMA, T3
- Outputs:
FastK,FastD - Values: 0 to 100
Ultimate Oscillator
Combines three different timeframes of buying pressure to reduce false signals, with values above 70 indicating overbought and below 30 indicating oversold.
ULTOSC(h, l, c, timeperiod1, timeperiod2, timeperiod3)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period1: default 7, 0 to 200
- Period2: default 14, 0 to 200
- Period3: default 28, 0 to 200
- Output:
ULTOSC - Values: 0 to 100
Williams %R
A momentum indicator that measures overbought and oversold levels, oscillating between -100 and 0, with values above -20 considered overbought and below -80 oversold.
WILLR(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
WILLR - Values: -100 to 0
Volume
Volume studies read buying and selling pressure from traded volume, to confirm or question a price move. 6 studies.
Chaikin A/D Line
Accumulation/Distribution Line measures the cumulative flow of money into and out of a security by considering both price location and volume.
AD(h, l, c, v)
- Inputs:
hhigh price,llow price,cclose price,vvolume - Settings: none
- Output:
AD
Chaikin A/D Oscillator
An oscillator derived from the Accumulation/Distribution Line, showing the difference between fast and slow EMAs of the A/D Line to identify momentum shifts.
ADOSC(h, l, c, v, fastperiod, slowperiod)
- Inputs:
hhigh price,llow price,cclose price,vvolume - Settings:
- FastPeriod: default 3, 0 to 200
- SlowPeriod: default 10, 0 to 200
- Output:
ADOSC
Directional Relative Volume
Relative volume with a direction attached, computed from bars alone. Returns three plots: ZVOL is the volume z-score over Length bars (identical to RELVOL_STDDEV), CONVICTION is how decisively the bar resolved in [-1, +1] (a blend of the signed body ratio and the close location value, weighted by WeightBody), and DIRVOL is max(ZVOL, 0) x CONVICTION. Gate ZVOL and CONVICTION separately to express states DIRVOL alone cannot: high ZVOL with CONVICTION near zero is heavy volume that resolved nothing, a churn or absorption bar.
RELVOL_DIRECTIONAL(o, h, l, c, v, length, w_body)
- Inputs:
oopen price,hhigh price,llow price,cclose price,vvolume - Settings:
- Length: default 60, 0 to 200
- WeightBody: default 50, 0 to 100. Percent weight on the signed body ratio; the remainder goes to the close location value.
- Outputs:
DIRVOL,ZVOL,CONVICTION
On Balance Volume
A cumulative volume-based indicator that adds volume on up days and subtracts on down days, measuring buying and selling pressure.
OBV(c, v)
- Inputs:
cclose price,vvolume - Settings: none
- Output:
OBV
Relative Volume Standard Deviation
Measures how many standard deviations the current volume is from its historical average, useful for identifying unusual volume activity.
RELVOL_STDDEV(v, length)
- Inputs:
vvolume - Settings:
- Length: default 60, 0 to 200
- Output:
VALUE
Volume Frontload Strength
Signed strength score combining z-scores of volume, dollar volume, trade count, average trade size, Lee-Ready ask/bid skew, aggression, block-trade intensity, and trade impact. Positive values indicate bullish frontload (aggressive buying); negative values indicate bearish dump. Weights are 0-100 (percent). Set RequireAgreement=1 to zero-out the result when price direction and order-flow direction disagree.
VOL_FRONTLOAD(v, c, o, tt, ats, tta, ttb, agg, bti, tir, length)
- Inputs:
vvolume,cclose price,oopen price,tttotal trades in feature window,atsaverage trade size,ttatrades on ask side (buy aggressor),ttbtrades on bid side (sell aggressor),aggaggression factor (normalized),btiblock trade intensity (normalized),tirtrade impact ratio (normalized) - Settings:
- Length: default 60, 0 to 200
- MinDollarVolume: default 0, 0 to 1000000000
- RequireAgreement: default 1, 0 to 1. Whether the price and order-flow direction must agree.
- WeightDollarVolume: default 25, 0 to 100
- WeightAggression: default 20, 0 to 100
- WeightLeeReadySkew: default 15, 0 to 100
- WeightAvgSize: default 15, 0 to 100
- WeightTradeCount: default 10, 0 to 100
- WeightBlockIntensity: default 10, 0 to 100
- WeightImpact: default 5, 0 to 100
- Output:
STRENGTH
Volatility
Volatility studies measure how much price swings. Use them to size stops and positions and to find stocks coiling before a breakout. 5 studies.
Average Daily Range
Average of the intraday high-to-low range over a period, published both in price units (ADR) and as the swing-trader percentage (ADRPercent = 100 x (mean(high/low) - 1)). Unlike ATR it ignores the previous close, so an overnight gap does not inflate it, it measures how far a stock travels once it is open.
ADR(h, l, period)
- Inputs:
hhigh price,llow price - Settings:
- Period: default 20, 0 to 200
- Outputs:
ADR,ADRPercent
Average True Range
Measures market volatility by calculating the average of true ranges over a period, with higher values indicating greater volatility.
ATR(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
ATR
Normalized Average True Range
ATR expressed as a percentage of the closing price, allowing volatility comparison across different price levels.
NATR(h, l, c, period)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
NATR
Squeeze (Compression + Expansion)
Coiled-spring compression and its release, as one study. COMPRESSION is the percentile rank of ATR(Length)/close over the trailing Lookback bars (0-100; low = coiled, this is the PCTRANK modifier's exact kernel, so it shares that floor of 100/Lookback and never reaches exactly 0). SQUEEZE_ON is 1 when Bollinger(Length, 2 stddev) sits entirely inside Keltner(Length EMA, 1.5x ATR(Length)), 0 when it does not, and NaN during warmup (never read a NaN bar as "not squeezed"). EXPANSION is ATR(5)/ATR(Length), the release trigger, values above roughly 1.3 following a low COMPRESSION reading are the tradable signal; compression alone is a weak, mostly-autocorrelated signal and should not be filtered without also gating EXPANSION. COMPRESSION is a weak rank (matches PCTRANK, ADR-0112): it never reaches exactly 0, floors at 100/Lookback (~0.4 at the default 252), and is not uniformly distributed. SQUEEZE_ON reads NaN (dropped by comparators, not matched as false) until Length+Lookback bars of history exist. EXPANSION is an unguarded ratio: a halted or limit-locked name (zero-range ATR) yields inf or NaN rather than a clamped value, matching the DIVIDE modifier's documented zero-denominator behaviour (ADR-0110). Filtering COMPRESSION alone, without also gating EXPANSION, is the overfit trap this study's own gate ruled out, see docs/lev-272-squeeze-gate.md.
SQUEEZE(h, l, c, length, lookback)
- Inputs:
hhigh price,llow price,cclose price - Settings:
- Length: default 20, 0 to 200
- Lookback: default 252, 0 to 504
- Outputs:
COMPRESSION,SQUEEZEON,EXPANSION
True Range
Measures the greatest of: current high minus current low, absolute value of current high minus previous close, or absolute value of current low minus previous close.
TRANGE(h, l, c)
- Inputs:
hhigh price,llow price,cclose price - Settings: none
- Output:
TRANGE
Price transforms
Price transforms combine a bar's open, high, low and close into a single price you can run other studies on. 4 studies.
Average Price
The average of a bar's open, high, low and close, (O + H + L + C) / 4. A single-bar smoothing of price that is less sensitive to a volatile close than the close alone.
AVGPRICE(o, h, l, c)
- Inputs:
oopen price,hhigh price,llow price,cclose price - Settings: none
- Output:
AVGPRICE
Median Price
The midpoint of a bar's range, (H + L) / 2. Represents the bar's central price independently of where it opened or closed.
MEDPRICE(h, l)
- Inputs:
hhigh price,llow price - Settings: none
- Output:
MEDPRICE
Typical Price
The average of a bar's high, low and close, (H + L + C) / 3. The price input CCI and MFI are built on, and the per-bar term inside a VWAP calculation.
TYPPRICE(h, l, c)
- Inputs:
hhigh price,llow price,cclose price - Settings: none
- Output:
TYPPRICE
Weighted Close Price
A bar's high, low and close averaged with double weight on the close, (H + L + 2C) / 4. Like Typical Price but leaning on where the bar settled.
WCLPRICE(h, l, c)
- Inputs:
hhigh price,llow price,cclose price - Settings: none
- Output:
WCLPRICE
Statistics
Statistical studies measure dispersion, correlation and regression over a window of bars. 9 studies.
Beta
Measures the volatility of a security relative to another security or benchmark over a specified period.
BETA(c0, c1, period)
- Inputs:
c0first series, typically closing price,c1second series, typically closing price of benchmark - Settings:
- Period: default 5, 0 to 200
- Output:
BETA
Linear Regression
Fits a linear regression line to price data over a period and returns the current endpoint value, useful for identifying trend direction.
LINEARREG(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
LINEARREG
Linear Regression Angle
Returns the angle of the linear regression line in degrees, helping to quantify trend steepness and strength.
LINEARREG_ANGLE(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
LINEARREG_ANGLE
Linear Regression Intercept
Returns the y-intercept of the linear regression line fitted to price data, useful for identifying support/resistance levels.
LINEARREG_INTERCEPT(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
LINEARREG_INTERCEPT
Linear Regression Slope
Returns the slope of the linear regression line, indicating the rate of price change and trend strength.
LINEARREG_SLOPE(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
LINEARREG_SLOPE
Pearson's Correlation Coefficient
Calculates the correlation coefficient between two price series over a period, ranging from -1 to +1 to measure their relationship strength.
CORREL(c0, c1, period)
- Inputs:
c0first series, typically closing price,c1second series, typically closing price of comparison security - Settings:
- Period: default 30, 0 to 200
- Output:
CORREL - Values: -1 to 1
Standard Deviation
Measures the dispersion of price values from their mean, with higher values indicating greater volatility.
STDDEV(c, period, nbdev)
- Inputs:
cclose price - Settings:
- Period: default 5, 0 to 200
- NbDev: default 1, 0 to 10
- Output:
STDDEV
Time Series Forecast
Extends the linear regression line one period into the future to forecast the next expected price value.
TSF(c, period)
- Inputs:
cclose price - Settings:
- Period: default 14, 0 to 200
- Output:
TSF
Variance
Calculates the variance of price values over a period, measuring the average squared deviation from the mean.
VAR(c, period, nbdev)
- Inputs:
cclose price - Settings:
- Period: default 5, 0 to 200
- NbDev: default 1, 0 to 10
- Output:
VAR
Cycle
Cycle studies use the Hilbert transform to estimate the length and phase of a price cycle, and whether price is trending or cycling. 5 studies.
Hilbert Transform - Dominant Cycle Period
Estimates the length, in bars, of the dominant price cycle currently present in the series. Used to size other indicators adaptively rather than fixing a period by hand.
HT_DCPERIOD(c)
- Inputs:
cclose price - Settings: none
- Output:
HT_DCPERIOD
Hilbert Transform - Dominant Cycle Phase
Reports how far through the dominant cycle price currently is, in degrees. Reading it alongside HT_DCPERIOD tells you where in a cycle a move is occurring, not just that one is.
HT_DCPHASE(c)
- Inputs:
cclose price - Settings: none
- Output:
HT_DCPHASE
Hilbert Transform - Phasor Components
Decomposes price into the two quadrature components of its analytic signal. Their relative magnitude is the raw material HT_DCPHASE and HT_SINE are derived from.
HT_PHASOR(c)
- Inputs:
cclose price - Settings: none
- Outputs:
InPhase,Quadrature
Hilbert Transform - SineWave
Plots the dominant cycle as a sine wave against a 45°-advanced lead wave. Crossings of the two are the conventional cycle-turn signal, and they separate cleanly only while the market is actually cycling, pair with HT_TRENDMODE.
HT_SINE(c)
- Inputs:
cclose price - Settings: none
- Outputs:
Sine,LeadSine
Hilbert Transform - Trend vs Cycle Mode
A 0/1 classifier: 1 when the series is trending, 0 when it is cycling. Intended as a gate on cycle studies, HT_SINE crossovers are only meaningful in cycle mode.
HT_TRENDMODE(c)
- Inputs:
cclose price - Settings: none
- Output:
HT_TRENDMODE
Math transforms
Math transforms apply one function to every value of a series. They are building blocks for study comparisons. 15 studies.
Arc Cosine
Applies the arc cosine (inverse cosine) mathematical transformation to price values.
ACOS(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Arc Sine
Applies the arc sine (inverse sine) mathematical transformation to price values.
ASIN(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Arc Tangent
Applies the arc tangent (inverse tangent) mathematical transformation to price values.
ATAN(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Base-10 Logarithm
Applies the base-10 logarithm mathematical transformation to price values.
LOG10(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Ceiling
Rounds price values up to the nearest integer.
CEIL(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Cosine
Applies the cosine mathematical transformation to price values.
COS(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Exponential
Applies the exponential (e^x) mathematical transformation to price values.
EXP(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Floor
Rounds price values down to the nearest integer.
FLOOR(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Hyperbolic Cosine
Applies the hyperbolic cosine mathematical transformation to price values.
COSH(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Hyperbolic Sine
Applies the hyperbolic sine mathematical transformation to price values.
SINH(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Hyperbolic Tangent
Applies the hyperbolic tangent mathematical transformation to price values.
TANH(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Natural Logarithm
Applies the natural logarithm (base e) mathematical transformation to price values.
LN(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Sine
Applies the sine mathematical transformation to price values.
SIN(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Square Root
Applies the square root mathematical transformation to price values.
SQRT(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Tangent
Applies the tangent mathematical transformation to price values.
TAN(c)
- Inputs:
cclose price - Settings: none
- Output:
Value
Math operators
Math operators combine two series, or roll one series over a window, so you can build a composite of your own. 11 studies.
Highest value over a specified period
Returns the highest value in the data series over a specified period.
MAX(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
MAX
Index of highest value over a specified period
Returns the index (position) of the highest value in the data series over a specified period.
MAXINDEX(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
MAXINDEX
Index of lowest value over a specified period
Returns the index (position) of the lowest value in the data series over a specified period.
MININDEX(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
MININDEX
Indexes of lowest and highest values over a specified period
Returns both the index of the lowest and highest values in the data series over a specified period.
MINMAXINDEX(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Outputs:
MinIndex,MaxIndex
Lowest and highest values over a specified period
Returns both the lowest and highest values in the data series over a specified period.
MINMAX(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Outputs:
Min,Max
Lowest value over a specified period
Returns the lowest value in the data series over a specified period.
MIN(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
MIN
Summation
Returns the sum of all values in the data series over a specified period.
SUM(c, period)
- Inputs:
cclose price - Settings:
- Period: default 30, 0 to 200
- Output:
SUM
Vector Arithmetic Add
Performs element-wise addition of two data series.
ADD(c0, c1)
- Inputs:
c0first series, typically closing price,c1second series to add - Settings: none
- Output:
ADD
Vector Arithmetic Division
Performs element-wise division of two data series.
DIV(c0, c1)
- Inputs:
c0numerator series, typically closing price,c1denominator series - Settings: none
- Output:
DIV
Vector Arithmetic Multiplication
Performs element-wise multiplication of two data series.
MULT(c0, c1)
- Inputs:
c0first series, typically closing price,c1second series to multiply - Settings: none
- Output:
MULT
Vector Arithmetic Subtraction
Performs element-wise subtraction of two data series.
SUB(c0, c1)
- Inputs:
c0first series, typically closing price,c1second series to subtract - Settings: none
- Output:
SUB



