Premium Indicator · SabrTrader

TDU VIDYA: an adaptive trend line with liquidity levels

TDU VIDYA builds a trend line from a moving average that speeds up when price is moving with conviction and slows down when it is drifting. Volatility bands around that average decide when the trend flips. On top of the trend line the indicator marks nearby swing levels as liquidity lines, labels them with volume once they are taken out, and shows the current trend in a small panel on the chart.

Adaptive VIDYA averageATR bandsTrend line with shadowLiquidity linesVolume labelsTrend flip markersSound alerts
SabrTrader TDU VIDYA on an E-mini S&P 500 (ES) median Renko chart with a green and red adaptive trend line, flip markers and liquidity lines
TDU VIDYA at default settings on an E-mini S&P 500 median Renko chart in SabrTrader. The trend line runs below price in green during an uptrend and above price in red during a downtrend, with a soft shadow between the line and the bars. Short horizontal liquidity lines mark swing levels, triangle markers show where the trend flipped, and a box in the corner states the current trend.

What the indicator is

VIDYA stands for Variable Index Dynamic Average. It is an exponential-style average whose smoothing factor changes from bar to bar. TDU VIDYA scales that factor by the absolute value of a Chande Momentum Oscillator, measured over VIDYA Momentum bars of closing prices (20 by default). When recent closes move mostly in one direction, the oscillator is high and the average follows price closely. When up moves and down moves cancel out, the oscillator is near zero and the average barely moves. The base speed comes from VIDYA Length (10 by default), and the result is smoothed once more with a 15-bar simple average.

Two bands are placed around that average at a distance of Band Distance Factor times a 200-bar ATR. With the default factor of 2, each band sits two ATRs from the average.

The trend is decided by the bands:

  • When a bar closes above the upper band after the previous close was at or below it, the trend turns up.
  • When a bar closes below the lower band after the previous close was at or above it, the trend turns down.

The line you see on the chart is the lower band while the trend is up and the upper band while the trend is down. It therefore trails price at a volatility-based distance, in the manner of a SuperTrend line. A close through the line flips the trend, the line moves to the band on the other side, and the flip bar itself is left as a gap.

Included, not an add-on

TDU VIDYA comes with SabrTrader on the Pro, Ultimate and Perpetual plans. There is no separate licence. The same plans include the rest of the premium library, such as TDU Wicked Wave, Volume Profile and Footprint.

How to read it on the chart

Element Default look What it tells you
Trend line Thick line, lime green in an uptrend and crimson in a downtrend Trend direction and the level a bar has to close through to flip it.
Shadow Soft gradient in the trend colour between the line and the middle of each bar Makes the side of the trend visible at a glance. Purely visual.
Trend marker Box with an up or down triangle at the line The trend flipped on the bar before. Up markers sit above the new line, down markers below it.
Liquidity line Thin horizontal line, green or red at half strength A swing low above the trend line in an uptrend, or a swing high below it in a downtrend.
Dot and volume label Dot on the liquidity line with a number such as 1.25K The trend line crossed that level. The number is the average bar volume around the swing.
Trend display Outlined box reading "TREND UP" or "TREND DOWN" The current trend, placed in the top left of the chart by default.

Liquidity lines come from swings with three bars on each side. A new line is five bars long. It ends early, with a dot and a volume label, when the trend line moves through its price within 50 bars of the swing. In an uptrend that means the rising trend line has climbed above an earlier swing low. In a downtrend the falling line has dropped below an earlier swing high.

The trend line needs some history before it starts: the larger of VIDYA Length and VIDYA Momentum plus 20 bars. The 200-bar ATR also settles as more bars load, so give the chart a few hundred bars.

Three ways traders use it

Trend filter

Trade long while the line is green and under price, short while it is red and over price. The trend display box gives the same answer in words if you keep several charts open.

Trailing reference

The line follows price at a distance set by volatility. Many traders use it as the place where a trend trade is no longer valid, since a close through the line is what flips the trend.

Swing levels inside the trend

Liquidity lines mark the swing lows of an uptrend and the swing highs of a downtrend. They show where pullbacks have held so far and where stops are likely to be resting.

Flip plus location

A trend flip that happens at a level from Volume Profile or TDU Pivots has more behind it than a flip in the middle of a range.

Follow the trend with an adaptive line

TDU VIDYA is included in Pro, Ultimate and Perpetual together with the whole premium library.

Download SabrTrader free See plans & pricing

How to add it in SabrTrader

  1. Open a chart of the instrument you trade and load a few hundred bars of history.
  2. Add the indicator. Open the indicator list and search for VIDYA. It draws directly on the price panel.
  3. Look at the defaults first. VIDYA Length 10, VIDYA Momentum 20 and Band Distance Factor 2.
  4. Set the band distance. This is the setting with the most effect. A larger factor keeps you in a trend longer and flips later. A smaller factor flips sooner and more often.
  5. Tidy the chart. The shadow, liquidity lines, volume labels, trend markers and the trend display each have their own switch. Move the trend display with its X and Y position if it covers something.
  6. Turn on the alert if you want a sound when the trend flips.

Settings reference

Setting Default What it does
VIDYA Length 10 Base length of the adaptive average. Longer is slower.
VIDYA Momentum 20 Number of closing-price changes used for the momentum reading that scales the average.
Band Distance Factor 2.0 Distance of the bands from the average, in multiples of the 200-bar ATR. Minimum 0.1.
Show Shadow On The gradient fill between the trend line and the bars.
Show Liquidity Lines On The swing level lines.
Show Volume Labels On The dot and volume number on a liquidity line that the trend line has crossed.
Show Trend Markers On The triangle markers at trend flips.
Up Trend / Down Trend Lime green / Crimson Colours of the trend line, shadow and markers.
Liquidity Line Up / Down Lime green / Crimson Colours of the liquidity lines at swing lows and swing highs.
Text Color White Colour of the volume labels and marker triangles.
Line width 3 Width of the trend line, from 0.5 to 20.
Enable Trend Flip Alerts Off Raises "VIDYA Trend Up" or "VIDYA Trend Down" when the trend flips.
Alert Sound Default sound The WAV file played with the alert.
Show Trend Display On The trend box on the chart.
Display X Position / Display Y Position 50 / 50 Offset of the trend box from the top left of the chart, in pixels.
Up Trend Color / Down Trend Color Lime green / Crimson Colours of the trend box.
Font sizes 12, 24 and 14 Volume Label Font size, Trend Marker Font size and Trend Display Font size.

The 15-bar smoothing, the 200-bar ATR and the three-bar swing size are fixed and are not settings.

Markets and data

The trend line, bands and markers are calculated from bar prices alone. The volume labels use the volume of the bars, so they need a feed that reports volume with its bars. No tick data or order flow is required. The indicator runs on futures, stocks, forex and crypto and on any bar type, including Renko, range, tick and volume bars. Any connected feed that delivers bars will do, for example Rithmic, dxFeed, Databento, IQFeed or Interactive Brokers.

The indicator calculates on bar close, and alerts fire on live bars only. Five values are available in the data box and to strategies: VIDYA, UpperBand, LowerBand, SmoothedPrice (the trend line) and Trend (1 for up, -1 for down).

Frequently asked questions

How is this different from a normal moving average?

A normal average uses the same smoothing on every bar. VIDYA multiplies its smoothing by a momentum reading, so it tracks price closely in a directional move and flattens out in a choppy one. The trend line you see is not the average itself. It is a band placed a multiple of ATR away from it.

What exactly flips the trend?

A close through the trend line. In an uptrend the line is the lower band, and a bar that closes below it turns the trend down. In a downtrend the line is the upper band, and a bar that closes above it turns the trend up. A wick through the line without a close beyond it does not flip the trend.

What are the liquidity lines?

Swing levels that sit on the price side of the trend line: swing lows above the line in an uptrend and swing highs below it in a downtrend. They are drawn five bars long. If the trend line passes through the level within 50 bars, the line is ended there with a dot and a volume label.

What does the number next to a dot mean?

It is the average volume of the six bars ending on the bar that confirmed the swing. Large numbers are shortened to K, M or B.

Why is there a gap in the trend line?

On the bar where the trend flips the line has no value, because it changes from one band to the other. The marker is drawn on the next bar, where the new line starts.

Is TDU VIDYA a separate purchase?

No. It is included in the Pro, Ultimate and Perpetual plans. See pricing or the full list of premium indicators.

Trend, levels and volume in one overlay

TDU VIDYA ships with SabrTrader on Pro, Ultimate and Perpetual. No add-on fee and no separate licence.

Download SabrTrader free Compare plans All premium indicators