Long Term Indicators: Big Hand and Coppock Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
Just found two new indicators for ThinkorSwim that can be used for long-term option trading.

Big Hand with Weekly Aggregation_Waylock_AlphaInvestor

Big Hand should be run on SPY WEEKLY Chart.

thinkScript Code

Rich (BB code):
#  Big_Hand_Arrows_On_Study_w_Agg

#  Use on Weekly Chart

#  Script by Waylock

# AlphaInvestor - 05/12/2017 - force to weekly aggregation

declare lower;

input agg = AggregationPeriod.WEEK;

# Hide Study Name and Inputs

# Add this to hide the text on the title bar

plot Scriptlabel = Double.NaN;

Scriptlabel.SetDefaultColor(CreateColor ( 6, 0, 48 ));

input fastLength = 19;

input slowLength = 39;

def c = close(period = agg);

plot Value = ExpAverage(c, fastLength) - ExpAverage(c, slowLength);

def Value_color = if Value > 0 then yes else no;

Value.DefineColor( "ValueUp", Color.GREEN );

Value.DefineColor( "ValueDn", Color.RED );

Value.AssignValueColor( if Value_color then Value.Color( "ValueUp" ) else Value.Color( "ValueDn" ) );

plot ZeroLine = 0;

Value.SetDefaultColor(Color.CYAN);

ZeroLine.SetDefaultColor(Color.YELLOW);

ZeroLine.HideTitle();

ZeroLine.HideBubble();

def xUndr = Value[1] < 0 and Value > 0;

def xOver = Value[1] > 0 and Value < 0;

plot ArrowUp = if xUndr then xOver else Double.NaN;

ArrowUp.SetPaintingStrategy(PaintingStrategy.ARROW_UP);

ArrowUp.SetDefaultColor(Color.YELLOW);

ArrowUp.SetLineWeight(5);

ArrowUp.HideTitle();

ArrowUp.HideBubble();

plot ArrowDn = if xOver then xUndr else Double.NaN;

ArrowDn.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

ArrowDn.SetDefaultColor(Color.YELLOW);

ArrowDn.SetLineWeight(5);

ArrowDn.HideTitle();

ArrowDn.HideBubble();

# Make Label on Study panel to show the value of the Big Hand

def data = Value;

AddLabel(yes, "Big Hand   " + Round(data, 2), if data > 0 then Color.GREEN else Color.RED);

AddLabel(yes, "Big Hand should be run on SPY WEEKLY Chart", Color.GRAY);

# End Study

Coppock Indicator

Charts the Coppock Indicator described here: https://en.wikipedia.org/wiki/Coppock_curve.

The Coppock can be used (along with other indicators like the Eureka Signal and IBD6000 %Es) to identify points where the stock market trend changes from down to up. The Coppock does not identify the beginning of downtrends. This study is designed to be applied to a major market index (e.g., SPX or COMP) with an aggregation period of weeks or months.

Copyright 2016 Scott J. Johnson (http://scottjjohnson.com)

thinkScript Code

Rich (BB code):
declare lower;

input RateOfChangeSlowPeriod = 14;
input RateOfChangeFastPeriod = 11;
input WeightedMAPeriod = 10;

def AggregationPeriod = if (getAggregationPeriod() < AggregationPeriod.WEEK) then AggregationPeriod.WEEK else getAggregationPeriod();

def price = close(period = AggregationPeriod);

def ROC1 = if price[RateOfChangeSlowPeriod]!=0 then (price/price[RateOfChangeSlowPeriod]-1)*100 else 0;
def ROC2 = if price[RateOfChangeFastPeriod]!=0 then (price/price[RateOfChangeFastPeriod]-1)*100 else 0;

plot Coppock = WMA(ROC1 + ROC2, WeightedMAPeriod);

Coppock.assignValueColor(if Coppock>Coppock[1] then color.green else color.red);
Coppock.SetDefaultColor(GetColor(1));
Coppock.setLineWeight(2);
Coppock.HideBubble();

plot ZeroLine = 0;

ZeroLine.SetDefaultColor(color.white);
ZeroLine.HideBubble();

AddChartBubble(Coppock[1] < 0 and Coppock > Coppock[1] and Coppock[1] < Coppock[2], Coppock, "Buy", Color.CYAN, no);

How to Use Both Indicators

The Big Hand indicator will let you know the beginning of a downtrend and also the beginning of an uptrend (indicated by arrow up and arrow down). The Coppock indicator will let you know when to buy into an uptrend (indicated by a Buy label).



# Example 1: Amazon



Let's use Amazon as an example. The last time we got a Buy signal from the Coppock indicator was October 9th, 2017. Closing price was $1002.94. Fast forward to October 23rd, we saw a $98 jump in price (in less than a month).

# Example 2: SPY

With SPY, the last time we got a Buy signal from the Coppock indicator was May 7th of this year. Closing price was $272.85. Shortly a month after, we saw a $5 jump in price.

I'll be taking a look at some of the signals given by the Big Hand indicator on SPY as well. In late September 2015 and early 2016, we saw a few uptrend and downtrend signals.

SPY opened at $195ish. Less than a month later, its lowest was 186ish. We can also see how the Coppock and Big Hand indicators correlate with each other at some events.



It's important to note that there is currently a downtrend signal on SPY, given by the Big Hand indicator.

Give these 2 indicators some backtesting and you should see a clear picture. Looking at historical data, we should see a Buy signal from the Coppock and an uptrend signal from the Big Hand indicator pretty soon. How I'm going to approach this strategy is fairly simple. Look through some historical data, see how much a stock usually jump after they were given a Buy signal and how long it took them. I'd say usually 1-2 months.
 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
You can even buy LEAPs too if you want.



SPY went from 273 to 293.94 in 4 months.



 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
Big Hand gave SPY a downtrend signal from 12/17. It opened at 259.4. Now SPY is at 237.13.



 
Last edited:
I

inpilna

New member
@BenTen

Ben, I think the sell arrow appeared after the weekly bar was built, therefore you would've only entered at the close of the bar, i.e. about $240 and missed the whole move.

Btw, how would you build the scan for Coppock, there's no function for buy signal=true. Thank you

 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
@inpilna I haven't been able to build a scanner on this one yet.

 
Last edited:
I

inpilna

New member
@BenTen Thank you for your reply, Ben.

 
Last edited:
R

ramblers926

New member
I have just hacked together a version of the Coppock scan based on the indicator code from Ben. It appears to be working, feel free to check it out and let me know if you come across issues. Note: Please make sure the aggregation period is set to Weekly or higher.

Thinkscript Code

Rich (BB code):
input RateOfChangeSlowPeriod = 14;
input RateOfChangeFastPeriod = 11;
input WeightedMAPeriod = 10;

def price = close;

def ROC1 = if price[RateOfChangeSlowPeriod]!=0 then (price/price[RateOfChangeSlowPeriod]-1)*100 else 0;
def ROC2 = if price[RateOfChangeFastPeriod]!=0 then (price/price[RateOfChangeFastPeriod]-1)*100 else 0;

def Coppock = WMA(ROC1 + ROC2, WeightedMAPeriod);

plot result = Coppock[1] < 0 and Coppock > Coppock[1] and Coppock[1] < Coppock[2];
 
Last edited by a moderator:
BenTen

BenTen

Administrative
Staff
VIP
@ramblers926 That's awesome! Thank you for sharing the scanner.

 
Last edited:

Top