Long Term Indicators: Big Hand and Coppock Indicator for ThinkorSwim

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

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:

BenTen

Administrative
Staff
VIP
Not long ago, I published this post. It went over two indicators that can be used for long term options trading (or just buying shares if you want to).

Last week, I noticed it signaled a "Buy" on Amazon and several other big tech stocks. I wanted to wait until today to see how these stocks perform after. This is a quick update for the Coppock indicator.

Assuming you buy these stocks at the last minute of the trading week.

Amazon



Buy signal: Started on the week of 12/31

Closing price of the last trading period: $1554.42

Closing price as of 1/8 (2 days after initial purchase): $1653.62

Change: +$99.2



Netflix



Buy signal: Started on the week of 12/31

Closing price of the last trading period: $288.95

Closing price as of 1/8 (2 days after initial purchase): $317.21

Change: +$28.26



FB



Buy signal: Started on the week of 12/24

Closing price of the last trading period: $134.17

Closing price as of 1/8 (6 days after initial purchase): $141.27

Change: +$7.1



GOOGL



Buy signal: Started on the week of 12/24

Closing price of the last trading period: $1053.1

Closing price as of 1/8 (6 days after initial purchase): $1083.27

Change: +$30.17



Up Next: SPY

SPY has been marked as a "Buy" by the Coppock indicator. However, it's still too soon since we're just 2 days into the new week. I would wait until Friday to see how things play out and whether or not the Buy signal will still be there.





I'll check back again on these stocks at the end of this week. Expecting bigger gains.

 
Last edited:

EvilAI

New member
Ben, I did some back testing with this indicator, along with a couple other of my favorite for confirmation.

My chosen indicators were RSI, MACD, CAPPOT, and BigHand:



Next, I picked a random past time window to to work from:



From there, I started going through random tickers and looking for good setups. The criteria I was looking for looked something like the following:

  • 1. Cappot issued a "Buy" signal recently
  • 2. Big hand bullish cross, or at a minimum not negative
  • 3. MACD recently crossed up (or about to)
  • 4. RSI not overbought and preferably above 50



Once I had found several tickers with matching criteria, I then headed over the ToS "Analyze -> ThinkBack" feature.

For those unfamiliar, this feature allows you to set the date to some time in the past in order to simulate trades from that time.



I set the start date in ThinkBack to match the end date of the time window I set up at the beginning.



Next, using the list of matching tickers, I simply bought 10 just out of the money calls for each one. My only criteria for selecting the options was that I wanted to have at least 30 days on monthly opex until expiration. So I chose an expiry of 12/21/2018 which would give 57 days until expiration.



Here is what the final list looked like once I finished buying calls for each ticker. Notice the P/L column on the right hand side, every ticker has a P/L of $0 since I just purchased the options. Also notice the Date is 10/25/2018 on the Backtrades section at the bottom.



Next, I started rolling the date forward to see how the options prices would change over time. First look here is a couple of days later at 10/27/2018.



$SPY:



Next 11/01/2018:



$SPY:



Next 11/08/2018:



SPY:



Next 11/30/2018:



SPY:



Finally, the day before expiry on 12/21/2018. Here many of the options have gone from positive to negative. This isn't surprising since, around this time is when the market began to decline rapidly. However, there were plenty of opportunities to take profits along the way on most of these.



SPY:



From my testing, this definitely looks like a great way to find good setups. That being said, this is still anecdotal, and perhaps I just luckily chose a really good time to buy based on market conditions.



Edit: Based on my comment about just luckily picking a good time, I went back and inserted $SPY analysis for the same expiration dates to analyze how these would perform against the larger index.

 
Last edited:

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

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

 
Last edited:

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

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

 
Last edited:

Lgh7vst

New member
2019 Donor
VIP
Wow yeah works pretty good. Thank you much appreciated. Is there a way to use this to find candidates to sell or go short?
 

Lgh7vst

New member
2019 Donor
VIP
So your saying that it can find candidates with sell signals? I've only been about to use it to find buy signal opportunities
 

BenTen

Administrative
Staff
VIP
@Lgh7vst The original Coppock indicator only provides buy signals. I reversed the buy condition so that it can also generate sell signals but giving sell signals isn't the intended way of using this indicator.
 

markos

Well-known member
VIP
So your saying that it can find candidates with sell signals? I've only been about to use it to find buy signal opportunities
Please remember also that these are long term indicators. The best signals may be on weekly charts and should be scanned with that in mind.
 

Lgh7vst

New member
2019 Donor
VIP
@Lgh7vst The original Coppock indicator only provides buy signals. I reversed the buy condition so that it can also generate sell signals but giving sell signals isn't the intended way of using this indicator.

Thanks for your reply. Ok, now what about using that code ramblers put to scan for buy candidates? That's actually what I meant, can we scan for sell candidates. I've never coded but I want to contribute. I'll try to tinker myself this week with it but don't know where to start. In the meantime I just wanted to know if it's possible to scan for short candidates. This may start to become a viable option with current market conditions.
 

BenTen

Administrative
Staff
VIP
@Lgh7vst Of course you can. In fact, the code for shorting was incorporated into this strategy. However, like I mentioned, Coppock was meant for bull market only. If you reverse the condition, it may not be a good idea. It might produce some good short signals but that wasn't the origingal purpose of the indicator.
 

Hariharan

New member
@Lgh7vst The original Coppock indicator only provides buy signals. I reversed the buy condition so that it can also generate sell signals but giving sell signals isn't the intended way of using this indicator.
Hi Ben
Very Nice indicator. I am new here. Also learning to trade. From the indicator above, I have two questions:
  • I don’t see any sell signal on the Cappock indicator. I only see Buy signals.
  • In the AMZN chart above, the Big Hand is on SPY and the Cappock is on AMZN. Am I correct to understand this? How do I get the Big Hand on the SPY on the AMZN chart for example?
  • Many thanks for clarifying.
 

Similar threads

Top