You’ll be happy to know that today’s release squashed a particularly troublesome EMA initialization bug. This is welcome news for those who use either the Vervoort Crossover or Heikin-Ashi Candlestick Oscillator as these use triple exponential moving averages and were negatively impacted by the bug. Thanks to the Thinkorswim team for hunting these down.

EMA Initialization Bug Fixed
Jan 19th, 2010 by ThinkScripter
BUG ALERT: Exponential Moving Average Initialization
Jan 2nd, 2010 by ThinkScripter
Heads up to all that there is a bug in the current builds of TOS that affects the initialization of exponential moving averages. Beginning with the December builds, TOS changed the way exponential moving averages were initialized. I will spare you the details of what I have found but it is a real PITA. The Vervoort Crossover and Heikin-Ashi Candlestick Oscillator studies are most affected since they use a triple exponential moving average. The leftmost part of any chart with these studies will be completely incorrect. As time progresses, the “Bad Data” is worked out and the indicators normalize. For the time being I recommend you do not use these studies. If you are compelled to then plot a much longer timeframe than you need to allow everything to settle out. Here is a picture of the Vervoort Crossover study and the wild swings early on in the chart. TOS is aware of the bug.
If You Don’t Read Karl Denninger’s Market Ticker….
Dec 31st, 2009 by ThinkScripter
…You should. Here’s a nice place to start:
http://market-ticker.org/archives/1802-MOVE-YOUR-MONEY.html
Volume Trend and Price Trend
Dec 16th, 2009 by ThinkScripter
In trading we constantly check to see if volume is confirming price. Rising price accompanied by falling volume is often the signal for an impending reversal. The Volume Trend plots the linear regression of the volume for the user specified last number of bars. The color of line reflects the slope – green for rising and red for falling. The Price Trend is a similar linear regression line. In this case, the line is colored blue if the price and volume are of diverging slopes and white else wise. Both indicators will automatically update with each bar. Also pictured is the revised AutoFibLines script. It is completely functional again and now has the added benefit of working on Forex pairs and other symbols trading down in the decimal range. Also added were a reversal dot indicating at what closing price the AutoFibs will reverse direction and update the fib levels as well as a trend direction arrow indicating in which direction the fibs have been drawn. PS: The ToS Script Editor is happy with cutting and pasting from the web again! ![]()
# TS_VolumeTrend
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 16 Dec 2009
declare fullrange;
declare on_volume;
declare real_size;
input period = 50;
plot VolTrend = InertiaAll(volume, period);
def volumeSlope = if voltrend>voltrend[1] then 1 else 0;
VolTrend.assignValueColor(if voltrend>voltrend[1] then color.green else color.red);
VolTrend.setLineWeight(2);
# TS_PriceTrend
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 16 Dec 2009
declare fullrange;
input price = close;
input period = 50;
def offset = 100;
def linearPriceTrend = InertiaAll(close, period);
def priceSlope = if linearPriceTrend>linearPriceTrend[1] then 1 else 0;
def dist = HighestAll(AbsValue(linearPriceTrend - price)) * (offset / 100.0);
def VolTrend = InertiaAll(volume, period);
def volumeSlope = if voltrend>voltrend[1] then 1 else 0;
plot PriceTrend = if priceSlope==0 then linearPriceTrend-dist else if priceSlope==1 then linearPriceTrend+dist else linearPriceTrend;
PriceTrend.assignValueColor(if volumeSlope != priceSlope then color.blue else color.white);
PriceTrend.setLineWeight(2);






