Variable Index Dynamic Average

VIDYA
Indicator

TrendOn the price chartFree on ChartLabs

VIDYA speeds up when a straight line fits the recent closes and slows down when it does not. The fit is measured by R-squared.

Created by Tushar Chande, 1992. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIVIDYAchartlabs.co/charts
Atlas reads it

VIDYA is 65,017.6.

VIDYA 65,017.6

Atlas reads it

VIDYA is 65,017.6.

VIDYA 65,017.6

Illustration on simulated data.

Variable Index Dynamic AverageWhat is the VIDYA indicator?

This is Chande's variable-index average in the R-squared form. The line starts equal to the first close. After that, the step toward the new close is the R-squared scale times R-squared of the closes so far, up to the length.

R-squared is how well a straight line fits those closes against time. A perfect line gives 1, so the step uses the full scale. A flat window gives 0, so VIDYA stays put. The default scale is 0.65 and the default length is 14, source close.

Closes of 10 then 12 are a perfect two-point line, so R-squared is 1 and the second value is 10 + 0.65 times 2 = 11.3. Two equal closes stay at 10, because R-squared is 0. The line is grey #999999, 1 px, on the price chart.

First bar

VIDYA starts as the first close. The fit is used from the second bar, on the closes seen so far, until 14 exist.

Flat window

If the closes in the window do not vary, R-squared is 0 and the line does not move that bar.

VIDYA signalsFive patterns to know.

1Inconclusive

Line chasing price

R-squared has been high, so a large share of the gap is closed each bar.

2Inconclusive

Line barely moving

The recent closes do not fit a line, so the step is small.

3Bullish lean

Price above VIDYA

The close is above the adaptive average.

4Bearish lean

Price below VIDYA

The close is under the adaptive average.

5Inconclusive

Unchanged on a flat patch

A run of equal closes leaves the line where it was.

VIDYA formulaHow it is calculated.

VIDYA=VIDYA+0.65×R2×(close−VIDYA)
STEP 1

Start at the close

The first bar's VIDYA is the close itself.

STEP 2

Measure the fit

Take R-squared of the closes against time, over the last 14 bars, or fewer while the chart is still filling.

STEP 3

Step toward price

Add scale times R-squared times the gap. From 10 to 12 at scale 0.65 the second value is 11.3.

VIDYA settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Length142 to 5,000How many closes go into R-squared. The Signal lens changes this.
R-squared scale0.650 to 1The largest fraction of the gap the line may close in one bar. Chande suggested a scale around 0.5 to 0.8.
SourceCloseAny price, or volumeThe series that is fitted and averaged.
LineGrey #999999, 1 pxFixedOne line on the price chart.
Setting
Length
Default
14
Range
2 to 5,000
What it changes
How many closes go into R-squared. The Signal lens changes this.
Setting
R-squared scale
Default
0.65
Range
0 to 1
What it changes
The largest fraction of the gap the line may close in one bar. Chande suggested a scale around 0.5 to 0.8.
Setting
Source
Default
Close
Range
Any price, or volume
What it changes
The series that is fitted and averaged.
Setting
Line
Default
Grey #999999, 1 px
Range
Fixed
What it changes
One line on the price chart.
1450 bars in the fit
70,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

VIDYA strategiesUse it in 3 setups.

A close above a moving line

Whileprice is aboveVIDYAand the line is rising

The fit has been good enough for the average to follow. Traders often treat that as a trend filter.

A sleepy line in a chop

IfVIDYAgoes flatwhile price chopsthenthe fit is poor

R-squared is low, so the line refuses to chase every wiggle.

Do not assume a fast line is a signal

Ifthe line suddenly catches upthenR-squared rose

A clean run of closes makes the step larger. It describes the fit. It does not name the next price.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

VIDYA mistakesCommon mistakes.

Reading a jump as a new average length

The length stays 14. The jump is a high R-squared, so more of the gap is applied at the 0.65 scale.

Expecting a move on equal closes

A flat window has R-squared of 0. The line holds.

Using the scale as a price unit

0.65 is a fraction of the gap, not a number of points.

VIDYA combinationsPair it with these.

VIDYA FAQQuestions traders ask.

What are the VIDYA settings?

Length 14, R-squared scale 0.65, source close.

What is the second-bar example?

Closes 10 then 12. R-squared of those two points is 1, so VIDYA goes from 10 to 11.3.

What if the closes are equal?

R-squared is 0 and the line stays. Two closes of 10 stay at 10.

Does the length change the speed by itself?

The length sets the window of the fit. The speed of the step is the scale times R-squared, capped by the scale of 0.65.

Where does the 0.65 come from?

It is this indicator's default scale. Chande wrote that a scale around one half to four fifths was a useful range.

Does VIDYA repaint?

No. A closed bar stays. The live bar moves until it closes. A new bar does not rewrite the fit of older closed bars.

Who created it?

Tushar Chande, "Adapting Moving Averages to Market Volatility", Stocks & Commodities, March 1992. The R-squared form is the one in his Beyond Technical Analysis (Wiley, 1997).

What timeframe can I use?

Any. Fourteen bars is fourteen minutes on a one-minute chart and fourteen days on a daily chart.

Related indicatorsMore trend tools.

All trend indicators

Try VIDYA on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
VIDYA