An exponential moving average (EMA) is an average that gives the newest bar the largest weight and lets older bars fade out gradually instead of dropping off a cliff.
The volume-weighted average price (VWAP) is the average price at which volume traded since an anchor point, where every bar counts in proportion to its volume.
Supertrend is a trailing line that sits below price in an uptrend and above it in a downtrend, set a multiple of the average true range away from the bar's midpoint.
Parabolic SAR (stop and reverse) places a dot on each bar, below price while the move is up and above it while it is down.
More trend indicators
Pivot Points
Classic floor-trader pivots: a central pivot plus three resistance and three support levels from the previous bar's high, low and close. Ours recalculates on every bar, so a daily chart uses yesterday and a weekly chart last week.
P = (H + L + C) / 3, R1 = 2P − L, S1 = 2P − H, R2 = P + (H − L), S2 = P − (H − L), R3 = H + 2(P − L), S3 = L − 2(H − P)
WMA
A weighted moving average gives the newest bar the largest weight and each older bar one step less, so it turns sooner than a simple average of the same length. Ours averages 20 bars of the close by default (the source can be changed).
WMA = Σ(w_j × close_j) / Σ w_j, w_j = 1 … N (newest bar = N), N = 20
HMA
The Hull moving average subtracts a full-length WMA from twice a half-length WMA to cancel most of the lag, then smooths that difference with a short WMA. With our default length of 20 it tracks price closely yet stays smooth.
The double exponential moving average takes twice an EMA and subtracts the EMA of that EMA, which removes much of the lag a single EMA carries. Default length 20 on the close. Our EMAs start at the first value rather than at an SMA seed.
DEMA = 2 × EMA(close, N) - EMA(EMA(close, N), N), N = 20
TEMA
The triple exponential moving average stacks three EMAs and combines them so that the lag of each layer cancels out, giving an even quicker line than DEMA. Default length 20 on the close.
The smoothed moving average applies Wilder's smoothing to the close: each new value keeps (N - 1)/N of the old one and adds 1/N of the new close. It starts from a simple average of the first N bars and is slower than an EMA of the same length (it behaves like an EMA of length 2N - 1).
SMMA_t = (SMMA_t-1 × (N - 1) + close_t) / N, first value = SMA(close, N), N = 20
ALMA
The Arnaud Legoux moving average weights the window with a bell curve whose peak is pushed toward the newest bars. Our defaults: 20 bars, offset 0.85 (the peak sits 85% of the way to the latest bar) and sigma 6 (how narrow the bell is).
ALMA = Σ(w_j × close_j) / Σ w_j, w_j = exp(-(j - m)² / (2s²)), m = offset × (N - 1), s = N / sigma
KAMA
Kaufman's adaptive moving average changes its own speed. An efficiency ratio compares the net move over 10 bars with the total bar-to-bar travel: a clean trend pushes the smoothing toward a fast 2-bar EMA, noise pushes it toward a slow 30-bar EMA.
KAMA_t = KAMA_t-1 + SC × (close - KAMA_t-1), SC = (ER × (2/(fast+1) - 2/(slow+1)) + 2/(slow+1))², ER = |close - close N ago| / Σ|Δclose|
VWMA
The volume-weighted moving average weights each close by its bar's volume, so heavy-volume bars pull the line harder than quiet ones. Default window 20 bars; it always reads the close, and shows nothing when the window has no volume.
VWMA = Σ(close × volume) / Σ volume, over the last N bars, N = 20
LSMA
The least-squares moving average fits a straight regression line through the last 25 closes and plots that line's value at the newest bar. Because it follows the fitted slope, it lags less than a simple average.
LSMA = a + b × (N - 1), a, b = least-squares intercept and slope of close over the last N bars (x = 0 … N - 1), N = 25
McGinley
The McGinley Dynamic is a tracking line whose speed adjusts to how far price has moved from it. The (close / MD)⁴ term enlarges the divisor when price is above the line and shrinks it when below, so it follows drops faster than rises. Default N = 14, starting at the first close.
Moving-average envelopes draw a 20-bar SMA of the close and two bands a fixed 2.5% above and below it. Unlike Bollinger bands, the width never changes with volatility: it is always the same percent of the middle line.
Two lines tracking the highest high and the lowest low of the last 252 bars, which is about 52 weeks on a daily chart. The lookback counts bars, not calendar days: on a weekly chart set it to 52. Early in the history the lines use whatever bars exist.
High = max(high over the last L bars), Low = min(low over the last L bars), L = 252
Fib Pivots
Fibonacci pivots take the classic pivot point of the previous bar and set support and resistance at 0.382, 0.618 and 1.0 times that bar's range. Ours always uses the immediately previous bar of the chart's own interval, so the levels change on every bar (yesterday's on a daily chart, the last hour's on an hourly one).
P = (H + L + C) / 3, R1/S1 = P ± 0.382 × (H - L), R2/S2 = P ± 0.618 × (H - L), R3/S3 = P ± (H - L)
Camarilla
Camarilla pivots hang eight tight levels off the previous bar's close (not its pivot), spaced by 1.1 times that bar's range divided by 12, 6, 4 and 2. As with our other pivots, the previous bar is the one just before on the chart's interval, so the levels step every bar.
R_k / S_k = C ± 1.1 × (H - L) / d_k, d = 12, 6, 4, 2 for levels 1 to 4
BBI
The Bull and Bear Index is a single line: the plain average of four simple moving averages of the close, of 3, 6, 12 and 24 bars. Blending short and medium windows gives a line between a fast and a slow average.
ZigZag joins swing highs and lows with straight lines and ignores moves smaller than a set percent (default 5%). A new pivot is fixed only once price has reversed from the running extreme by that much and at least 10 bars separate it from the previous pivot. The last leg runs to the latest extreme and keeps redrawing until confirmed.
pivot when the reversal from the running extreme ≥ D% and bars since the last pivot ≥ depth, D = 5, depth = 10
Williams Fractals
Williams fractals mark short-term turning points. An up fractal (green triangle above the bar) is a bar whose high beats the 2 bars on each side; a down fractal (red triangle below) is the mirror with lows. A mark can only appear once the bars after it exist, so the newest 2 bars never carry one.
up at bar i: high_i > high of the n bars before and ≥ high of the n bars after; down: the same with lows, n = 2
Elder Impulse
The Elder Impulse System colours a strip in its own pane, one block per bar. Green means both a 13-bar EMA of the close and the MACD histogram (12, 26, 9) rose versus the previous bar; red means both fell; blue means they disagree.
green: EMA(13) up and MACD hist up; red: EMA(13) down and MACD hist down; blue: otherwise
Seasonals (monthly)
Monthly seasonals show, in their own pane, the average return of each calendar month (Jan to Dec) over the last 10 full years. A month's return runs from the previous month's last close to its own last close. The current year is left out of the average and drawn as a tick on each bar. Needs two or more years of history.
R(month, year) = last close in month / last close of the previous month - 1; Avg = mean of R over the last Y full years, Y = 10
Seasonals (weekly)
Weekly seasonals work like the monthly version with 52 week-of-year buckets. Weeks count from the day of the year in UTC (days 1 to 7 are week 1; the last day or two fold into week 52), not ISO weeks. Returns run from the previous week's last close, averaged over 10 full years, with the current year beside them.
week = min(52, floor(day of year / 7) + 1); R = last close in week / last close of the previous week - 1; Avg = mean of R over Y = 10 years
Auto levels (beta)
Auto levels (beta) draws support and resistance from swing pivots in all loaded bars. A pivot is a bar whose high or low is the extreme of the 5 bars on each side. Pivot prices are clustered within a tolerance; each cluster's mean is a level, its pivot count the touches. The nearest 3 levels per side with 2 or more touches are kept; thicker lines mean more touches.
tol = max(0.6 × ATR(14), 0.0075 × last close); level = mean of pivot prices within tol; support if below last close - tol/4, resistance if above last close + tol/4
Zero-lag EMA
The zero-lag EMA is an exponential average fed a corrected price instead of the raw close. The correction adds back the distance price has moved over the last few bars, which pulls the line closer to current price than a plain EMA of the same length.
T3 is Tillson’s smoother: six stacked EMAs blended with fixed weights set by a volume factor of 0.7. The blend cancels much of the lag six rounds of smoothing would add, leaving a smooth but responsive line on price.
T3 = c1·e6 + c2·e5 + c3·e4 + c4·e3, e1 = EMA(close, 10), eN = EMA(eN-1, 10), a = 0.7
Guppy MMA (short)
The short Guppy group is six fast EMAs of the close (3, 5, 8, 10, 12, 15) drawn together on price. It stands for short-term traders in the Guppy multiple moving average and is meant to be read next to the long group.
EMA(close, n) for n = 3, 5, 8, 10, 12, 15
Guppy MMA (long)
The long Guppy group is six slow EMAs of the close (30, 35, 40, 45, 50, 60) drawn together on price. It stands for longer-term investors in the Guppy multiple moving average and is usually read together with the short group.
EMA(close, n) for n = 30, 35, 40, 45, 50, 60
SMA ribbon
The SMA ribbon draws five simple moving averages of the close at once: 10, 20, 50, 100 and 200 bars. Seeing short, medium and long averages together shows how the trend lines up across time frames on a single chart.
SMA(close, n) for n = 10, 20, 50, 100, 200
Linear regression channel
This channel plots, on every bar, the end point of a least-squares line fitted to the last 100 closes, with bands two standard deviations above and below. Because it is recomputed bar by bar, it draws as a curve that follows price rather than one fixed straight channel.
The Vortex indicator compares upward and downward bar-to-bar reach over 14 bars, each scaled by the true range of the same window. VI+ grows when highs keep reaching above prior lows, VI- when lows keep reaching below prior highs. Both draw in a separate pane.
The detrended price oscillator strips the trend out of price so shorter cycles stand out. Ours compares the close from 11 bars ago with the current 20-bar SMA, which is the textbook comparison moved onto today’s bar so nothing reads future data.
Know Sure Thing blends four rates of change, from short to long, into one momentum line. Each ROC is smoothed by an SMA, and longer ones get bigger weights, so the line leans toward the slower cycles. A 9-bar SMA of it is drawn as the signal line.
The Coppock curve adds a 14-bar and an 11-bar rate of change and smooths the sum with a 10-bar weighted average. It was built for monthly index charts to spot the end of long declines; ours runs on whatever bar size the chart shows.
Elder Ray measures how far buyers and sellers push price away from a 13-bar EMA. Bull power is the bar high minus the EMA, bear power is the bar low minus the EMA, and both draw as histograms in a separate pane.
Bull power = high - EMA(close, 13), Bear power = low - EMA(close, 13)
Alligator (unshifted)
The Alligator is three smoothed moving averages of the bar midpoint: jaw (13), teeth (8) and lips (5). The original pushes each line forward by several bars; ours draws them unshifted, on the bar they were computed, so no value sits in the future.
Distance from the 50-day shows, in percent, how far the close sits above or below its 50-bar simple average. It turns the familiar price-versus-MA picture into a single histogram in its own pane.
% from MA = 100 · (close - SMA(close, 50)) / SMA(close, 50)
MA spread 50/200
The MA spread is the gap between the 50-bar and the 200-bar simple averages, expressed as a percent of the current close. It shows how wide the golden-cross or death-cross gap is, not just whether the averages have crossed.
The Mayer Multiple divides the close by its 200-bar simple average. A value of 1 means price sits exactly on the long average; the script draws a reference line there. It was popularised on bitcoin but works the same on any series.
Multiple = close / SMA(close, 200)
MA slope
MA slope shows how fast the 50-bar simple average is moving: its change over the last 5 bars, as a percent of the current close. It answers whether the trend line itself is climbing, flat or falling.
Linear regression slope is the slope of the least-squares line fitted to the last 50 closes, in price units per bar. Ours derives it from the gap between the line’s end point and the window mean.
Woodie pivots build levels from the previous bar, counting its close twice so the pivot leans toward where the bar finished. Ours uses the prior bar of the chart’s timeframe (yesterday on a daily chart).
P = (H+L+2C)/4, R1 = 2P - L, S1 = 2P - H, R2/S2 = P ± 2(H-L)
Previous bar H / L / C
This script draws the previous bar’s high, low and close as lines on the current bar. On a daily chart that is yesterday’s range and close, a common set of reference levels for the session that follows.
Prev high = high[1], Prev low = low[1], Prev close = close[1]
Efficiency ratio
Kaufman’s efficiency ratio compares the net move over 10 bars with the total distance price travelled bar by bar in that time. It is the noise gauge behind his adaptive average, scaled from 0 to 1.
ER = |close - close[10]| / Σ |close - close[1]| (sum over 10 bars)
Vertical Horizontal Filter
The vertical horizontal filter tells trending stretches from ranging ones. It divides the spread between the highest and lowest close of the last 28 bars by the sum of all bar-to-bar close moves in that window.
The random walk index asks whether price travelled farther over 14 bars than a random walk of the same volatility would, scaling the distance by ATR times the square root of the length.
The trend intensity index looks at how the close has sat against its 60-bar SMA over the last 30 bars. It adds up the positive gaps and the negative gaps and reports the positive share as a 0 to 100 score.
TII = 100 · ΣPos / (ΣPos + ΣNeg), dev = close - SMA(close, 60), sums over 30 bars
Gator Oscillator
The Gator oscillator shows the Alligator lines opening and closing. The upper histogram is the gap between jaw and teeth, the lower one is the gap between teeth and lips drawn below zero. Like our Alligator, the lines are unshifted.
This script puts two percent changes side by side over 252 bars (about a year on daily bars): price and trailing earnings per share (EPS). It shows whether the share price ran ahead of, or behind, earnings.
This is the price-to-earnings ratio written in the formula language, as a starting point for building your own ratio. Each bar divides the close, restated in the company’s reporting currency, by the trailing twelve-month EPS known on that bar.
P/E = close_reporting / eps (blank when eps ≤ 0)
VIDYA
VIDYA is Chande’s variable-index average: an EMA whose speed is scaled by the strength of recent momentum. Over a 9-bar window, strong one-way moves let it follow price closely, while balanced up and down moves slow it almost to a stop.
FRAMA is Ehlers’ fractal adaptive average. Over 16 bars it estimates how jagged price has been (its fractal dimension) and turns that into the smoothing factor: smooth trending stretches make it fast, jagged ranges make it slow.
The SuperSmoother is Ehlers’ two-pole filter: it removes swings shorter than about 10 bars while adding less lag than an average of similar smoothness. It averages each close with the one before and feeds back its own last two values.
The instantaneous trendline is an Ehlers filter that tracks the trend with very little delay. It mixes the last three closes with its own two previous values, using one smoothing constant alpha (0.07 by default).
The Decycler is Ehlers’ trend line built by subtraction: it runs a two-pole high-pass filter that keeps only cycles shorter than 60 bars, then takes that away from the close. What is left is the slow trend, with very little lag.
The Gann HiLo activator is a single stepping line built from two 10-bar simple averages, one of the highs and one of the lows. While price holds above the average of highs, the line sits on the average of lows; once price closes below the average of lows, it flips to the average of highs.
HiLo = SMA(low, 10) if close > SMA(high, 10)[1]; SMA(high, 10) if close < SMA(low, 10)[1]; else HiLo[1]
Trendflex
Trendflex is Ehlers’ trend-strength gauge and the companion of Reflex. It smooths the close with a SuperSmoother (cutoff 10), measures how far the latest value sits above the average of the previous 20, and divides by a running root-mean-square of that gap so the scale is comparable across stocks.
Trendflex = s / √ms, s = f - Σ f[1..20] / 20, ms = 0.04·s² + 0.96·ms[1], f = SuperSmoother(close, 10)
Rainbow MA
The Rainbow MA stacks eight simple averages, each a 2-bar SMA of the one before it. Every layer is a little smoother and later than the last, so the band widens in strong moves and narrows when price stalls. Ours draws eight layers, where some versions use ten.
MA1 = SMA(close, 2), MAn = SMA(MAn-1, 2) for n = 2..8
Average Price
Average price is the plain mean of each bar’s open, high, low and close, drawn as a line on price. It gives one value per bar that reflects the whole bar instead of only where it closed.
Average price = (open + high + low + close) / 4
Median Price
Median price is the midpoint between each bar’s high and low, drawn as a line on price. Several indicators, such as the Alligator and the Awesome Oscillator, use it as their input.
Median price = (high + low) / 2
Typical Price
Typical price is the mean of each bar’s high, low and close, drawn as a line on price. It weights the close a little more than the median price does, and it is the input behind indicators such as CCI and the money flow index.
Typical price = (high + low + close) / 3
MA Cross
MA Cross draws two simple moving averages of the close on price, a short one (9 bars by default) and a long one (26 bars). The point is the relationship between them: which is on top and where they cross.
Short = SMA(close, 9), Long = SMA(close, 26)
EMA Cross
EMA Cross draws two exponential moving averages of the close on price, a short one (9 bars by default) and a long one (26 bars). EMAs weight recent bars more, so they react faster than simple averages of the same length.
Short = EMA(close, 9), Long = EMA(close, 26)
MA with EMA Cross
MA with EMA Cross draws a 10-bar simple average against a 20-bar exponential average of the close. The two kinds of average react differently: the EMA leans toward recent bars, the SMA weights the whole window evenly.
MA = SMA(close, 10), EMA = EMA(close, 20)
Moving Average Channel
The moving average channel draws a 20-bar simple average of the highs and another of the lows. Together they frame the bar range that price has typically covered recently.
Upper = SMA(high, 20), Lower = SMA(low, 20)
Moving Average Hamming
The Hamming moving average weights the last 9 closes by a Hamming window: bars in the middle of the window count most, bars at both ends count least. The result is smoother than a simple average of the same length.
MA = Σ w(k)·close[k] / Σ w(k), w(k) = 0.54 - 0.46·cos(2πk / (9 - 1)), k = 0..8
Moving Average Multiple
Moving Average Multiple draws six simple averages of the close at once, 5, 10, 20, 30, 50 and 100 bars by default, each length adjustable. It is a quick way to see short and medium trends together.
SMA(close, n) for n = 5, 10, 20, 30, 50, 100
Linear Regression Curve
The linear regression curve fits a least-squares straight line to the last 9 closes on every bar and plots where that line ends. Joined bar by bar, these end points form a curve that tracks price with less lag than a simple average.
Classic pivots turn the previous bar’s high, low and close into a pivot and three levels on each side. Ours uses the prior bar of the chart’s own timeframe (yesterday on a daily chart), so the levels step to new values every bar.
P = (H+L+C)/3, R1 = 2P - L, S1 = 2P - H, R2/S2 = P ± (H-L), R3/S3 = P ± 2(H-L)
Pivot Points (DM)
DeMark pivots weight the previous bar’s high, low or close twice depending on how that bar closed, so the pivot leans in the bar’s direction. Only one level is drawn on each side. Ours uses the prior bar of the chart’s timeframe.
X = H+2L+C if C<O, 2H+L+C if C>O, else H+L+2C; P = X/4, R1 = X/2 - L, S1 = X/2 - H
Majority Rule
Majority Rule counts how many of the last 20 bars closed higher than the bar before and shows that share in percent. It ignores the size of each move and looks only at direction.
Majority = 100 · (number of bars with close > close[1] in the last 20) / 20
Trend Strength Index
The trend strength index here is the Pearson correlation between the close and time over the last 14 bars. It tells how closely recent prices line up on a straight line, and in which direction, on a scale from -1 to +1.
TickerBase is provided for educational and informational purposes only. Nothing on this page is financial, investment, tax or legal advice, or a recommendation to buy, sell or hold any security. Figures are approximate and drawn from public filings. Past performance does not predict future results.