By popular request, here is my incarnation of a sine wave cycle support and resistance study similar to Barry Taylor’s excellent indicator (TradeStation, NinjaTrader, MultiCharts) over at Emini-Watch. The indicator plots support and resistance levels based on John Ehlers’ MESA Sine Wave. The advantage of the MESA Sine Wave is in identifying cyclical turning points before they occur; 1/8th of a cycle prior according to Ehlers. The study begins plotting the horizontal dots (white overhead resistance, red support) when a cycle turn is predicted and will continue until the next cycle turn occurs. When the market begins to trend and is no longer cyclic, the price levels are seen to be breakout points. Also pictured is a new version of the Volume Profile that allows you to stack as many profiles as you desire to create a plot with greater detail.
Sine Wave Cycles
Feb 6th, 2010 by ThinkScripter
Stochastic Momentum Index with Divergence Signals
Feb 1st, 2010 by ThinkScripter
I’ve taken the TOS Stochastic Momentum Index, a fast oscillator adept at showing divergences, and added a little twist. Each time the indicator makes a top or bottom and a regular divergence (trend reversal) is detected, an arrow is added indicating the direction of the divergence. The red arrows indicate negative divergence and green positive. Hidden divergences (continuation signals) are plotted in white. Also pictured is a custom variation of the Volume Profile allowing expanded fidelity by stacking numerous copies of the indicator. A keen eye will also reveal my incarnation of a support and resistance indicator based on sine wave cycles which is under development. Both studies will be included in next weekend’s Pro Subscriber update.
Gap Fill
Jan 28th, 2010 by ThinkScripter
By popular request, here is a study that will display a gap opening and it’s 50% fill line. The plot will dynamically collapse as the gap is filled. It will work on any intraday chart timeframe, 24 hours or regular trading hours so long as the two affected trading days are showing. (Edit: If you would like the % Gap Filled box in the upper left, uncomment out the last line of code by removing the #)
# TS_GapFill
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 28 Jan 2010
input marketOpenTime = 0930;
input marketCloseTime = 1615;
def yesterdaysClose = close(period = "DAY")[1];
def secondsFromOpen = secondsFromTime(marketOpenTime);
def secondsTillClose = secondsTillTime(marketCloseTime);
def marketOpen = if secondsFromOpen >= 0 and secondsTillClose >= 0 then 1 else 0;
rec regularHoursOpen = if (secondsFromOpen >= 0 and secondsFromOpen[1] < 0) or
(getDay() != getDay()[1]) then open else regularHoursOpen[1];
def newDay = if getDay() != getDay()[1] then 1 else 0;
rec regHoursHigh = if newDay then high else if marketOpen then
if high > regHoursHigh[1] then high else regHoursHigh[1] else high;
rec regHoursLow = if newDay then low else if marketOpen then
if low < regHoursLow[1] then low else regHoursLow[1] else low;
def yc = if marketOpen then yesterdaysClose else double.nan;
def o = if marketOpen then regularHoursOpen else double.nan;
def hg = o + (yc - o) / 2;
def gapUp = if yc < o then 1 else 0;
def gapDown = if yc > o then 1 else 0;
def gapRemaining = if gapUp then
Max(regHoursLow - yc, 0) else
if gapDown then Max(yc - regHoursHigh, 0) else 0;
def percentRemaining = 100 * gapRemaining / AbsValue(yc - o);
def gapFilled = if percentRemaining == 0 then 1 else 0;
def halfGapFilled = if percentRemaining <= 50 then 1 else 0;
plot gH = if (gapUp and !gapFilled and marketOpen and !newDay[-1])
then regHoursLow else if (gapDown and !gapFilled and marketOpen and !newDay[-1])
then yc else double.nan;
plot gL = if (gapUp and !gapFilled and marketOpen and !newDay[-1])
then yc else if (gapDown and !gapFilled and marketOpen and !newDay[-1])
then regHoursHigh else double.nan;
plot hGF = if !gapFilled and !halfGapFilled and marketOpen and !newDay[-1]
then hg else double.nan;
gH.SetPaintingStrategy(paintingStrategy.DaSHES);
gH.AssignValueColor(if gapDown then color.darK_red else color.dark_green);
gL.SetPaintingStrategy(paintingStrategy.DASHES);
gL.AssignValueColor(if gapDown then color.darK_red else color.dark_green);
hGF.setStyle(curve.LONG_DASH);
hGF.SetDefaultColor(color.dark_gray);
gH.hideBubble();
gL.hideBubble();
hgF.hideBubble();
AddCloud(gH, gL, color.gray, color.gray);
#AddChartLabel(gapUp or gapDown, percentRemaining, " % Gap Remaining", color.white);
Market Thrust Indicator
Jan 23rd, 2010 by ThinkScripter
The internal strength of the market can be gauged using many internal measures including Up Volume, Down Volume, Advancing, and Declining Issues. The Market Thrust indicator combines these four values to produce a single plot that gauges these internals. It is simply a plot of (Advancing Issues X Advancing Volume) – (Declining Issues x Declining Volume). On strong trend days the indicator will generally trend one direction all day. The indicator is also particularly adept at showing divergences between price and internals. Added to the upper left corner of the indicator is the Up Volume – Down Volume as an additional reference. Note the second image below of this week’s market. The slow grind up on Wednesday afternoon was accompanied by ever worsening internals. The rest, they say, is history.
# TS_MarketThrust
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 22 Jan 2010
declare lower;
input AvePeriod = 10;
input showOnlyToday = YES;
def T1c = (close("$ADVN")*close("$UVOL"))-(close("$DECN")*close("$DVOL"));
plot T1 = if showOnlyToday and getDay()==getLastDay() then T1c else if !showOnlyToday then T1c else double.nan;
T1.setDefaultColor(color.red);
def TAvec = average(T1,AvePeriod);
plot TAve = if showOnlyToday and getDay()==getLastDay() then TAvec else if !showOnlyToday then TAvec else double.nan;
TAve.setDefaultColor(color.white);
plot zero = 0;
zero.setDefaultColor(color.yellow);
def U = close("$UVOL");
def D = close ("$DVOL");
def DVOL = U - D;
AddChartLabel(yes,DVOL,
"UVOL-DVOL",
if DVOL > DVOL[1] then color.green else color.red );
EMA Initialization Bug Fixed
Jan 19th, 2010 by ThinkScripter
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.










