Trend Momentum Volatility Volume

Trend Momentum Volatility Volume (TMV) was authored by Barbara Star in the Stocks and Commodities Magazine, Feb. 2012. The TMV displays five indicators, Keltner Channels (KC), Commodity Channel Index (CCI), the Volume Oscillator (VO), Average Directional Index (ADX) and a Simple Moving Average (SMA). The price bars change color based on the ADX and the SMA. See individual studies for details. This indicator’s definition is further expressed in the condensed code given in the calculation below.

See Keltner Channel
See Commodity Channel Index
See Average Directional Index
See Volume Oscillator
See Simple Moving Average


How To Trade Using the TMV

The price bars change colors as outlined in the code below.

How To Access in MotiveWave

Go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.

Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.


//input = price, user defined, default is close
//period = user defined, default is 13
//keltner upper range = upperRange user defined, default is 2
//keltner lower range = lowerRange user defined, default is 2
//volume method = method user defined, default is sma
//volume fast period = fastPeriod user defined, default is 1
//volume slow period = slowPeriod user defined, default is 20
//adx period = adxPeriod user defined, default is 10
//sma period = smaPeriod user defined, default is 8
//prev = previous, index = current bar number

Plot: sma = sma(index, smaPeriod, input);

Plot: cci = CCI(series, index, period);

// Calculate the +DM, -DM and TR
pDm = getPositiveDM(index);
nDm = getNegativeDM(index);
tr = getTrueRange(index);
// Calculate the Average +DM, -DM and TR
pdMa = smma(index, period, PDM);
ndMa = smma(index, period, NDM);
tra = smma(index, period, TR);
// Determine the +DI, -DI and DX
pdi = pdMa / tra * 100;
ndi = ndMa / tra * 100;
dx = Math.abs((pdMa - ndMa)) / (pdMa + ndMa) * 100;
//Calculate the Average DX
Plot:adx = smma(index, period, DX);

//Keltner Channel
Plot: middle = ma(EMA, index, period, input);
atr = atr(index, period);
Plot: top = middle + (upperRange * atr);
Plot: bottom = middle - (lowerRange * atr);

//Volume Oscillator
ma1 = ma(method, index, fastPeriod, VOLUME);
ma2 = ma(method, index, slowPeriod, VOLUME);
Plot: vo = ma1 - ma2;

//Modify price bar colors
prevAdx = ADX[index-1];
up = adx moreThan prevAdx AND price moreThan sma; 
down = adx moreThan prevAdx AND price lessThan sma;
if (up) setPriceBarColor(index, upColor);
if (down) setPriceBarColor(index, downColor);
if (NOTup AND NOTdown) setPriceBarColor(index, neutralColor);