VIDYA
Indicator
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.
VIDYA is 65,017.6.
VIDYA 65,017.6
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.
Line chasing price
R-squared has been high, so a large share of the gap is closed each bar.
Line barely moving
The recent closes do not fit a line, so the step is small.
Price above VIDYA
The close is above the adaptive average.
Price below VIDYA
The close is under the adaptive average.
Unchanged on a flat patch
A run of equal closes leaves the line where it was.
VIDYA formulaHow it is calculated.
Start at the close
The first bar's VIDYA is the close itself.
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 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.
| Setting | Default | Range | What it changes |
|---|---|---|---|
| Length | 14 | 2 to 5,000 | How many closes go into R-squared. The Signal lens changes this. |
| R-squared scale | 0.65 | 0 to 1 | The largest fraction of the gap the line may close in one bar. Chande suggested a scale around 0.5 to 0.8. |
| Source | Close | Any price, or volume | The series that is fitted and averaged. |
| Line | Grey #999999, 1 px | Fixed | One 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.
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
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
R-squared is low, so the line refuses to chase every wiggle.
Do not assume a fast line is a signal
A clean run of closes makes the step larger. It describes the fit. It does not name the next price.
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 + KAMA
KAMA adapts with an efficiency ratio. VIDYA adapts with R-squared of the closes.
VIDYA + EMA
An EMA always uses the same weight. VIDYA's weight changes with the fit.
VIDYA + Chande Momentum Oscillator
Chande's other adaptive average uses the CMO. This one uses R-squared.
VIDYA + Least Squares Moving Average
That line is the least-squares fit itself. VIDYA only uses the fit's R-squared as a speed.
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 indicatorsTry VIDYA on a live chart.
Free. No download.
Works in your browser and on iPhone too.