Vervoort Crossover Indicator with Watchlist for ThinkorSwim

dougn

Member
2019 Donor
VIP
Study here...

Code:
# VervoortCrossover

# (c) 2009 http://www.thinkscripter.com

# [email protected]

# Last Update 30 MAR 2009

# Tweaked by R Houseer August 2012

# RH_Vervoort_Channel_V2

# Buy scan - RH_Vervoort_Channel_V2().signalBuy #buy scan

# Sell scan - RH_Vervoort_Channel_V2().signalSell # sell scan

# Scan both - RH_Vervoort_Channel_V2().signalBuy or RH_Vervoort_Channel_V2().signalSell #scan for either

# Alerts added - option added to be turned on and off

input period = 55;

input alertsOn = yes;

def price = (high+low+close)/3;

#-----Typical Price ZeroLag Triple Exponential Moving Average

def TMA1 = 3 * ExpAverage(price, period)

- 3 * ExpAverage(ExpAverage(price, period), period)

+ ExpAverage(ExpAverage(ExpAverage(price, period)

, period), period);

def TMA2 = 3 * ExpAverage(TMA1, period)

- 3 * ExpAverage(ExpAverage(TMA1, period), period)

+ ExpAverage(ExpAverage(ExpAverage(TMA1, period)

, period), period);

def difference = TMA1 - TMA2;

plot TypicalPriceZeroLagTEMA = TMA1 + difference;

TypicalPriceZeroLagTEMA.SetDefaultColor(color.green);

#------Heikin-Ashi Close ZeroLag Triple Exponential Moving Average

rec haopen = compoundValue(1, ((open[1] + high[1]

+ low[1] + close[1]) / 4 + haopen[1]) / 2, hl2);

def haclose = ((open + high + low + close) / 4 + haopen

+ Max(high, haopen) + Min(low, haopen)) / 4;

def HATMA1 = 3 * ExpAverage(haclose, period)

- 3 * ExpAverage(ExpAverage(haclose, period), period)

+ ExpAverage(ExpAverage(ExpAverage(haclose, period)

, period), period);

def HATMA2 = 3 * ExpAverage(HATMA1, period)

- 3 * ExpAverage(ExpAverage(HATMA1, period), period)

+ ExpAverage(ExpAverage(ExpAverage(HATMA1, period)

, period), period);

def HAdifference = HATMA1 - HATMA2;

plot HeikinAshiZeroLagTEMA = HATMA1 + HAdifference;

HeikinAshiZeroLagTEMA.SetDefaultColor(color.plum);

def buySignal = if TypicalPriceZeroLagTEMA > HeikinAshiZeroLagTEMA and TypicalPriceZeroLagTEMA[1] <= HeikinAshiZeroLagTEMA[1] then 1 else 0;

def sellSignal = if TypicalPriceZeroLagTEMA < HeikinAshiZeroLagTEMA and TypicalPriceZeroLagTEMA[1] >= HeikinAshiZeroLagTEMA[1] then 1 else 0;

plot signalBuy = if buySignal then TypicalPriceZeroLagTEMA * 0.999 else double.nan;

signalBuy.SetDefaultColor( Color.UPTICK );

signalBuy.SetLineWeight(3);

signalBuy.SetPaintingStrategy( PaintingStrategy.ARROW_UP );

plot signalSell = if sellSignal then TypicalPriceZeroLagTEMA * 1.0015 else double.nan;

signalSell.SetDefaultColor( Color.DOWNTICK );

signalSell.SetLineWeight(3);

signalSell.SetPaintingStrategy( PaintingStrategy.ARROW_DOWN );
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Vervoort watchlist column...

Code:
# VervoortCrossover

# (c) 2009 http://www.thinkscripter.com

# [email protected]

# Last Update 30 MAR 2009

# Tweaked by R Houseer August 2012

# RH_Vervoort_Channel_V2

# Buy scan - RH_Vervoort_Channel_V2().signalBuy #buy scan

# Sell scan - RH_Vervoort_Channel_V2().signalSell # sell scan

# Scan both - RH_Vervoort_Channel_V2().signalBuy or RH_Vervoort_Channel_V2().signalSell #scan for either

# Alerts added - option added to be turned on and off



input period = 55;

input alertsOn = yes;



def price = (high+low+close)/3;



#-----Typical Price ZeroLag Triple Exponential Moving Average



def TMA1 = 3 * ExpAverage(price, period)

- 3 * ExpAverage(ExpAverage(price, period), period)

+ ExpAverage(ExpAverage(ExpAverage(price, period)

, period), period);



def TMA2 = 3 * ExpAverage(TMA1, period)

- 3 * ExpAverage(ExpAverage(TMA1, period), period)

+ ExpAverage(ExpAverage(ExpAverage(TMA1, period)

, period), period);



def difference = TMA1 - TMA2;

def TypicalPriceZeroLagTEMA = TMA1 + difference;



#------Heikin-Ashi Close ZeroLag Triple Exponential Moving Average



rec haopen = compoundValue(1, ((open[1] + high[1]

+ low[1] + close[1]) / 4 + haopen[1]) / 2, hl2);

def haclose = ((open + high + low + close) / 4 + haopen

+ Max(high, haopen) + Min(low, haopen)) / 4;



def HATMA1 = 3 * ExpAverage(haclose, period)

- 3 * ExpAverage(ExpAverage(haclose, period), period)

+ ExpAverage(ExpAverage(ExpAverage(haclose, period)

, period), period);



def HATMA2 = 3 * ExpAverage(HATMA1, period)

- 3 * ExpAverage(ExpAverage(HATMA1, period), period)

+ ExpAverage(ExpAverage(ExpAverage(HATMA1, period)

, period), period);



def HAdifference = HATMA1 - HATMA2;



def HeikinAshiZeroLagTEMA = HATMA1 + HAdifference;



def buySignal = if TypicalPriceZeroLagTEMA > HeikinAshiZeroLagTEMA and TypicalPriceZeroLagTEMA[1] <= HeikinAshiZeroLagTEMA[1] then 1 else 0;



def sellSignal = if TypicalPriceZeroLagTEMA < HeikinAshiZeroLagTEMA and TypicalPriceZeroLagTEMA[1] >= HeikinAshiZeroLagTEMA[1] then 1 else 0;



def signalBuy = if buySignal then TypicalPriceZeroLagTEMA * 0.999 else double.nan;



def signalSell = if sellSignal then TypicalPriceZeroLagTEMA * 1.0015 else double.nan;



# coding addition by @DTWCoachandDude on Twitter

# http://www.stocktwits.com/DTWCoachandDude/ …

# http://www.facebook.com/DTWCoachandDude/ …

# https://www.twitter.com/DTWCoachandDude/ …



plot SignalPlot =

if buySignal

then TypicalPriceZeroLagTEMA * 0.999

else if sellSignal

then TypicalPriceZeroLagTEMA * 1.0015

else double.nan;

SignalPlot.assignvalueColor(

if buySignal

then color. black

else if sellSignal

then color. black

else color. black);



assignbackgroundColor(

if buySignal

then color. green

else if sellSignal

then color. red

else color. black);
 
Last edited by a moderator:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
222 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top