Category Archives: technical indicator

World Met Resistance

In this article titled “World, Meet Resistance” – dated 12/21/2017 – I noted the fact that many single country ETFs and regional indexes were closing in on a serious level of potential resistance.  I also laid out three potential scenarios.  So what happened?  A fourth scenario not among the three I wrote about (Which really pisses me off.  But never mind about that right now).

As we will see in a moment what happened was:

*(Pretty much) Everything broke out above significant resistance

*Everything then reversed back below significant resistance.

World Markets in Motion

Figure 1 displays the index I follow which includes 33 single-country ETFs. As you can see, in January it broke out sharply above multi-year resistance. Just when it looked like the index was going to challenge the all-time high the markets reversed and then plunged back below the recently pierced resistance level.

(click to enlarge)1

Figure 1 – Jay’s World Index broke out in January, fell back  below resistance in February (Courtesy AIQ TradingExpert)

The same scenario holds true for the four regional indexes I follow – The Americas, Europe, Asia/Pacific and the Middle East – as seen in Figure 2.

(click to enlarge)2

Figure 2 – Jay’s Regional Index all broke above resistance, then failed (Courtesy  AIQ TradingExpert)

So where to from here?  Well I could lay out a list of potential scenarios. Of course if history is a guide what will follow will be a scenario I did not include (Which really pisses me off.  But never mind about that right now).

So I will simply make a subjective observation based on many years of observation.  The world markets may turn the tide again and propel themselves back to the upside.  But historically, when a stock, commodity or index tries to pierce a significant resistance level and then fails to follow through, it typically takes some time to rebuild a base before another retest of that resistance level unfolds.

Here’s hoping I’m wrong

Jay Kaeppel

Disclaimer:  The data presented herein were obtained from various third-party sources.  While I believe the data to be reliable, no representation is made as to, and no responsibility, warranty or liability is accepted for the accuracy or completeness of such information.  The information, opinions and ideas expressed herein are for informational and educational purposes only and do not constitute and should not be construed as investment advice, an advertisement or offering of investment advisory services, or an offer to sell or a solicitation to buy any security.

The VixRSI14 Indicator – Part 1

While the bulk of the financial world focuses most of its attention on whether or not Bitcoin will turn to sh, er, something that rhymes with Bitcoin, a lot of “old timers” continue on with trying to look at markets in a more traditional way. Unfortunately, some people who try to look at markets in a more traditional way also spend an inordinate amount of time “dividing one number by another” thinking there is some purpose to it (“Hi. My name is Jay”)

The only good news is that every once in awhile something useful – or at least potentially useful (since no single calculation guarantees profitability which also involves other “minor” issues such as which securities to trade, allocation size, entry method, profit taking criteria, stop loss triggers and so on and so forth). A number of years ago I stumbled upon a calculation that I ultimately refer to as VixRSI (for reasons that will become fairly obvious soon).  More specifically I have a few different versions but one I like is call used VixRSI14.

First the Good News: In this and some future articles I will detail how I apply VixRSI14 to monthly, weekly and daily price charts.

Now the Bad News: Nothing that I will write in any of those articles will detail a “simple automated system that generates you can’t lose trading signals guaranteed to make you rich beyond the dreams of avarice.”  Sorry about that. But I thought you should know.

The truth is that the indicator generates signals – and yes, a certain percentage of the time those signals aren’t that great.  And even on occasions when the signals are decent all of the factors I mentioned above (securities traded, capital allocation, etc.) still hold the key to turning a “signal” into a “profit”.

VixRSI14

VixRSI14 is calculated by combining Larry William’s “VixFix” indicator with the standard old 14-day RSI from Welles Wilder. I’ve decided to put the calculations at the end of the article in order to avoid scaring anyone off.

For now let’s look at what to look for on a monthly price chart.

VixRSI14 on a Monthly Chart

OK, true confession time: there is (at least as far as I can tell) no “one best way” to use VixRSI14 on a monthly chart.  So I will simply show you “One way.”

*A “buy alert” is triggered when the monthly value for VixRSI14 first rises to 3.5 or higher and then drops back to 3.0 or below

*Before going on please note that there is nothing “magic” about 3.5 or 3.  Different values can be used and will generate varying results.

*Also, some may prefer to simply look for a drop from above 3 to below 3 without requiring a move above 3.5

*Finally please note the use of the phrase “buy alert” and the lack of the phrase “BUY AS MUCH AS YOU CAN RIGHT THIS VERY MINUTE!!!!”

Figures 1 through 4 show several different Dow30 stocks “through the years.

1

Figure 1 – Ticker AXP (Courtesy AIQ TradingExpert)

2

Figure 2 – Ticker BA (Courtesy AIQ TradingExpert)

3

Figure 3 – Ticker HPQ (Courtesy AIQ TradingExpert)

4

Figure 4 – Ticker IBM (Courtesy AIQ TradingExpert)

Summary

Buy alerts on monthly charts using the criteria I described are obviously very rare.  In fact many securities never see the VixRSI14 rise high enough to trigger an alert.  Likewise, not every 3.5 then 3 event for every stock will work out as well as those depicted in Figures 1 through 4.

Still, remember that I am just presenting an “idea” and not a finished product.

Code:

William’s VixFix is simply the 22-day high price minus today’s low price divided by the 22-day high price (I then multiply by 100 and then add 50).  That may sound complicated but it is not.

The code for AIQ TradingExpert appears below.

########## VixFix Code #############

hivalclose is hival([close],22).

vixfix is (((hivalclose-[low])/hivalclose)*100)+50.

###############################

####### 14-period RSI Code ###########

Define periods14 27.

U14 is [close]-val([close],1).

D14 is val([close],1)-[close].

AvgU14 is ExpAvg(iff(U14>0,U14,0),periods14).

AvgD14 is ExpAvg(iff(D14>=0,D14,0),periods14).

RSI14 is 100-(100/(1+(AvgU14/AvgD14))).

###############################

VixRSI14 is then calculated by dividing the 3-period exponential average of VixFix by the 3-period exponential average of RSI14

####### VixRSI14 Code ###########

VixRSI14 is expavg(vixfix,3)/expavg(RSI14,3).

###############################

Jay Kaeppel

Disclaimer:  The data presented herein were obtained from various third-party sources.  While I believe the data to be reliable, no representation is made as to, and no responsibility, warranty or liability is accepted for the accuracy or completeness of such information.  The information, opinions and ideas expressed herein are for informational and educational purposes only and do not constitute and should not be construed as investment advice, an advertisement or offering of investment advisory services, or an offer to sell or a solicitation to buy any security.

Weekly and Daily MACD

The AIQ code based on Vitali Apirine’s article in December 2017 issue of Stocks and Commodities magazine, “Weekly & Daily MACD,” is provided below.
The moving average convergence/divergence oscillator (MACD), developed by Gerald Appel, is one of the more popular technical analysis indicators. The MACD is typically used on a single timeframe, but what if we looked at two timeframes on one chart?

Traders can look for relative daily MACD line crossovers, weekly and daily centerline crossovers, and divergences to generate trading signals. 
Figure 5 shows the daily & weekly MACD indicator on a chart of Apple Inc. (AAPL) during 2016 and 2017, when there was a change from a downtrend to an uptrend.
Sample Chart

FIGURE 5: AIQ. Here is an example of the daily & weekly MACD on a chart of AAPL.
The code and EDS file can be downloaded from http://aiqsystems.com/dailyweeklyMACD.EDS, or copied here:
!WEEKLY & DAILY MACD
!Author: Vitali Apirine, TASC Dec 2017
!Coded by: Richard Denning 10/13/17
!www.TradersEdgeSystems.com

!INPUTS:
S is 12.
L is 25.

EMA1 is expavg([Close],S).
EMA2 is expavg([Close],L).
EMA3 is expavg([Close],S*5).
EMA4 is expavg([Close],L*5).
MACD is EMA1 - EMA2.
MACDW is EMA3 - EMA4.
rdMACD is MACD + MACDW.
—Richard Denning
info@TradersEdgeSystems.com
for AIQ Systems

A Simple Indicator for Traders

First the Bad News: There are no “magic bullets” when it comes to trading.  There are people in this industry who have literally tested somewhere in the range of six bazillion “indicators” – give or take (“Hi. My name is Jay”).  Every trend following indicator looks like a gold mine when it latches onto a huge trend and rides it (but not so much when it starts getting whipsawed).  And every overbought/oversold indicator looks like a gift from heaven from time to time when it somehow manages to peak (or valley) and then reverses right at a high (or low).  And then the next time the thing gets oversold the security in question just keeps plunging and the previously “amazingly accurate” indicator just gets more and more oversold.

Bottom line: what I am about to discuss is likely no better or worse than a lot of other indicators.  And it is no holy grail.  Still, I kinda like it – or whatever that is worth.

EDITORS NOTE an AIQ EDS file for this indicator with the 3 step rules outlined can be downloaded from here you will need to copy or save this file into your wintes32/eds strategies folder. Alternatively the code is available at the end of this article for copying and pasting into a new EDS file.

UpDays20

I call this indicator UpDays20 and I stole, er, learned it originally from Tom McClellan of McLellan Financial Publications.  My calculation may be slightly different because I wanted an indicator that can go both positive and negative.  For a given security look at its trading gains and losses over the latest 20 trading days.

UPDays20 = (Total # of Up days over the last 20 trading days) – 10

So if 10 of the last 20 trading days showed a gain then UpDays20 would read exactly 0.

If only 6 of the last 20 trading days showed a gain then UpDays20 would read -4

You get the idea (and proving once again that it “doesn’t have to be rocket science”).  As a “trading method” it is always advised that this indicator – like most all other indicators – NOT be used as a standalone approach to trading.  That being said, the way I follow this indicator is as follows.

Step 1) UpDays20 drops to at least -2

Step 2) UpDays20 rises 2 points from a low

Step 3) The security in question then rises above its high for the previous 2 trading days

It is preferable to follow this setup hen the security in question is above its 200-day moving average, but that is up to the trader to decide (the danger to using this with a security below its 200-day moving average is that it might just be in the middle of a freefall.  The upside is that counter trend rallies can be fast and furious – even if sometimes short-lived).

Again, there is nothing magic about these particular steps.  They are simply designed to do the following:

1) Identify an oversold condition

2) Wait for some of the selling pressure to abate

3) Wait for the security to show some sign of reversing to the upside

Like just about every other indicator/method, sometimes it is uncannily accurate and sometimes it is embarrassingly wrong (hence the reason experienced traders understand that capital allocation and risk management are far more important than the actually method you use to enter trades).

In this previous article (in Figures 3 and 4) I wrote about using this indicator with ticker TLT.  Figure 1 and 2 display the “buy” signals generated using the rules above for tickers IYT and GLD.

1Figure 1 – UpDays20 “Buy” Alerts for ticker IYT (Courtesy AIQ TradingExpert)

2Figure 2 – UpDays20 “Buy” Alerts for ticker GLD (Courtesy AIQ TradingExpert)

Are these signals good or bad?  That is in the eye of the beholder and not for me to say.  One big unanswered question is “when do you exit”?  That is beyond the scope of this “idea” article – however, “sell some at the first good profit and then use a trailing stop” looks like a decent approach to consider) but would have a profound effect on any actual trading results.

Some of the signals displayed in Figures 1 and 2 are obviously great, others are maybe not so hot.  Interestingly, some of the signals in Figure 1 and 2 that don’t look to timely at first blush actually offered a profitable opportunity to a trader who was inclined to take a quick profit. Again, how you allocate capital and when you exit with a profit and when you exit with a loss would likely have as much impact on results as the raw “buy” signals themselves.

Summary

No one should go out and start trying to trade tomorrow based on UpDays20.  No claim is being made that the steps detailed herein will result in profits nor even that this is a good way to trade.

But, hey, it’s one way.

Jay Kaeppel Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro client.

Disclaimer:  The data presented herein were obtained from various third-party sources.  While I believe the data to be reliable, no representation is made as to, and no responsibility, warranty or liability is accepted for the accuracy or completeness of such information.  The information, opinions and ideas expressed herein are for informational and educational purposes only and do not constitute and should not be construed as investment advice, an advertisement or offering of investment advisory services, or an offer to sell or a solicitation to buy any security.

EDITORS NOTE an AIQ EDS file for this indicator with the 3 step rules outlined can be downloaded from here you will need to copy or save this file into your wintes32/eds strategies folder. Alternatively the code is available at the end of this article for copying and pasting into a new EDS file.

! UpDays20 – I call this indicator UpDays20. For a given security look at its trading gains and losses over the latest 20 trading days.

! UPDays20 = (Total # of Up days over the last 20 trading days) – 10

! So if 10 of the last 20 trading days showed a gain then UpDays20 would read exactly 0.

! If only 6 of the last 20 trading days showed a gain then UpDays20 would read -4

Upday if [close]>val([close],1).

totalupdayslast20days is CountOf(upday,20).

updayindicator is totalupdayslast20days – 10.

! How to follow this indicator

! Step 1) UpDays20 drops to at least -2

! Step 2) UpDays20 rises 2 points from a low

! Step 3) The security in question then rises above its high for the previous 2 trading days

UpDays20rises2points if updayindicator>valresult(updayindicator,1) and valresult(updayindicator,1)>valresult(updayindicator,2).

updays20atminus2orlower if valresult(updayindicator,2)<=-2.

closesabovehighof2priordays if [close]>val([high],1) and [close]>val([high],2).

Upsignal if UpDays20rises2points and updays20atminus2orlower and closesabovehighof2priordays.

Detecting Swings

The AIQ code based on Domenico D’Errico’s article in the May 2017 issue of Stoks Commodities, “Detecting Swings,” is provided below.

I tested the author’s four systems using the NASDAQ 100 list of stocks on weekly bars, as did the author, from 3/16/2005 through 3/14/2017. Figure 7 shows the comparative metrics of the four systems using the four-week exit. The results were quite different than the author’s, probably due to a different test portfolio and also a 10-year test period rather than the author’s 20-year period. In addition, my test results show longs only, whereas the author’s results are the average of both the longs and shorts.

Sample Chart
 
FIGURE 7: AIQ. As coded in EDS, this shows the metrics for the author’s four systems run on NASDAQ 100 stocks (weekly bar data) over the period 3/16/2005 to 3/14/2007.

The Bollinger Band (Buy2) system showed the worst results, whereas the author’s results showed the Bollinger Band system as the best. The pivot system (Buy1) showed the best results, whereas the author’s results showed the pivot system as the worst. I am not showing here the comparative test results for the Sell1 thru Sell4 rules, as all showed an average loss over this test period.

!DECTECTING SWINGS
!Author: Domenico D'Errico, TASC May 2017
!Coded by: Richard Denning, 3/15/17
!www.TradersEdgeSystems.com

!Set to WEEKLY in properties

Low is  [low].
Low1  is valresult(Low,1).
Low2  is valresult(Low,2). 
High is [high].
High1  is valresult(High,1).
High2  is valresult(High,2). 
PivotLow if Low1 < Low2  and Low1 < Low.
PivotHigh if High1 > High2  and High1 > High.

Buy1 if  PivotLow.  
Sell1 if  PivotHigh.    

!Set parameter for bollinger bands to 12 with 2 sigma (weekly) in charts:
Buy2 if [close] > [Lower BB] and valrule([close] <= [Lower BB],1).
Sell2 if [close] < [Upper BB] and valrule([close] >= [Upper BB],1).

!Set parameter for Wilder RSI to 5 (weekly) in charts:
Buy3 if [RSI Wilder] > 40 and valrule([RSI Wilder] <= 40,1).
Sell3 if [RSI Wilder] < 60 and valrule([RSI Wilder] >= 60,1).

Buy4 if [RSI Wilder] < 40  And Low > Low1.
Sell4 if [RSI Wilder] > 60  And High < High1.    

Exit if {position days} >= 4.
—Richard Denning
info@TradersEdgeSystems.com
for AIQ Systems
Editor note: The code and EDS file can be downloaded from http://aiqsystems.com/Detecting_Swings_TASC_May_2017.EDS

The MACD ‘Tell’ Strikes Goldman Sachs

There are many ways to use the MACD indicator developed long ago by Gerald Apel.  This is one of them.  Maybe.  Nothing more, nothing less.
First the caveat: what follows is NOT a “trading system” or even something that you should consider on a standalone basis.
MACD
The MACD indicator uses exponential moving averages to identify the underlying trend for a given security and is also used by many traders to identify divergences which may signal an impending change of trend.
Figure 1 displays the daily MACD for ticker SPY.
1
Figure 1 – Ticker SPY with MACD Indicator (Courtesy AIQ TradingExpert)
The MACD ‘Tell’
While this is NOT intended to be a mechanical signal, I am going to put specific rules on it just to give it some structure.  The rules:
1) If the daily MACD (12,26,9) has declined for at least 7 consecutive trading days AND
2) The 2-day RSI is at 64 or above
Then an “alert” signal is flashed.  The key thing to note is that if the MACD ticks higher on the day that the 2-day RSI rises above 64, the signal is negated.
Before proceeding please note that the 12,26,9 parameter selection is simply the “standard” for MACD.  Also, there is nothing magic about 7 consecutive days – so one might experiment with different values there.  Finally, using the 2-day RSI and a “trigger” value of 64 are also both arbitrary.  There may be better values and/or different overbought/oversold indicators to use.
Ticker GS
A “classic” example of the MACD Tell appears in Figure 2 using ticker GS.
2
Figure 2 – Ticker GS with the MACD Tell (Courtesy AIQ TradingExpert)
The MACD Tell is typically best used as a short-term indicator.  In this case a short-term trader might have considered playing the short side of GS – or even better – using option strategies such as buying puts or selling bear call spreads.
Summary
No one should rush out and start trading put options based on this indicator (or any other indicator for that matter) without spending some time doing some homework and testing out the viability for producing profits.
In reality, this is the type of indicator that should typically be combined with “something else” and/or used as a confirmation rather than as a standalone approach.
Jay Kaeppel
 
Disclaimer:  The data presented herein were obtained from various third-party sources.  While I believe the data to be reliable, no representation is made as to, and no responsibility, warranty or liability is accepted for the accuracy or completeness of such information.  The information, opinions and ideas expressed herein are for informational and educational purposes only and do not constitute and should not be construed as investment advice, an advertisement or offering of investment advisory services, or an offer to sell or a solicitation to buy any security.

Volume-Weighted Moving Average Breakouts

The AIQ code based on Ken Calhoun’s article in the February 2017 issue of Technical Analysis ofSTOCKS & COMMODITIES, “Volume-Weighted Moving Average Breakouts,” can be found at http://aiqsystems.com/Volume-Weighted-Moving-Average-Breakouts.EDS 
 
Please note that I tested the author’s system using the NASDAQ 100 list of stocks on daily bars rather than intraday bars from 12/31/2008 thru 2/10/2017. Figure 7 shows the resulting equity curve trading the author’s system with the cross-down exit. Figure 8 shows the ASA report for this test. The annualized return showed about a 17% return with a maximum drawdown of 19%.
Sample Chart

FIGURE 7: AIQ. Here are sample test results from the AIQ Portfolio Manager taking three signals per day and 10 concurrent positions maximum run on NASDAQ 100 stocks (daily bar data) over the period 12/31/08 to 2/10/07.
Sample Chart

FIGURE 8: AIQ. This shows the ASA report for the system, which shows the test metrics and settings.
The code and EDS file can be downloaded from http://aiqsystems.com/Volume-Weighted-Moving-Average-Breakouts.EDS , and is also shown below.
!Volume-Weighted Moving Average Breakouts
!Author: Ken Calhoun, TASC Apr 2017
!Coded by: Richard Denning 2/11/17
!www.TradersEdgeSystems.com

!INPUTS:
smaLen is 70.
vwmaLen is 50.

SMA is simpleavg([close],smaLen).
VWMA is sum([close]*[volume],vwmaLen)/sum([volume],vwmaLen).
HasData if hasdatafor(max(smaLen,vwmaLen)+10)>max(smaLen,vwmaLen).
Buy if SMA < VWMA and valrule(SMA > VWMA,1) and HasData.
Sell if SMA > VWMA.

rsVWMA is VWMA / valresult(VWMA,vwmaLen)-1.
rsSMA is SMA / valresult(SMA,smaLen)-1.
—Richard Denning
info@TradersEdgeSystems.com
for AIQ Systems

Exponential Standard Deviation Bands

The AIQ code based on Vitali Apirine’s article in the 2017 issue of Stocks & Commodities magazine, “Exponential Standard Deviation Bands”

Editor note: “Author Vitali Apirine presented a method intended to help traders see volatility while a stock is trending. These bands, while similar to Bollinger Bands, are calculated using exponential moving averages rather than simple moving averages. Like Bollinger Bands, they widen when volatility increases and narrow as volatility decreases. He suggests that the indicator can be used as a confirming indication along with other indicators such as the ADX. Here’s an AIQ Chart with the Upper, Lower and Middle Exponential SD added as custom indicators.”

 

 

To compare the exponential bands to Bollinger Bands, I created a trend-following trading system that trades long only according to the following rules:
  1. Buy when there is an uptrend and the close crosses over the upper band. An uptrend is in place when the middle band is higher than it was one bar ago.
  2. Sell when the low is less than the lower band.
Figure 8 shows the summary test results for taking all signals from the Bollinger Band system run on NASDAQ 100 stocks over the period 12/9/2000 to 12/09/2016. Figure 9 shows the summary test results for taking all signals from the exponential band system on NASDAQ 100 stocks over the same period. The exponential band system improved the average profit per trade while reducing the total number of trades.

Sample Chart

FIGURE 8: AIQ. Here are summary test results for taking all signals from the Bollinger Band system run on NASDAQ 100 stocks over the period 12/9/2000 to 12/09/2016.

Sample Chart

FIGURE 9: AIQ. Here are summary test results for taking all signals from the exponential band system run on NASDAQ 100 stocks over the period 12/9/2000 to 12/09/2016.
The EDS file can be downloaded from http://aiqsystems.com/EDS/Exponential_Standard_Deviation_Bands.EDS 
and is also shown here:
!Exponential Standard Deviation Bands
!Author: Vitali Apirine, TASC February 2017
!Coded by: Richard Denning 12/11/2016
!www.TradersEdgeSystems.com!INPUT:
xlen is 20.
numSD is 2.

!INDICATOR CODE:
ExpAvg is expavg([close],xlen).
Dev is [close] – ExpAvg.
DevSqr is Dev*Dev.
SumSqr is sum(DevSqr,xlen).
AvgSumSqr is SumSqr / xlen.
ExpSD is sqrt(AvgSumSqr).

!UPPER EXPONENTIAL SD BAND:
UpExpSD is ExpAvg + numSD*ExpSD.  !PLOT ON CHART

!LOWER EXPONENTIAL SD BAND:
DnExpSD is ExpAvg – numSD*ExpSD.   !PLOT ON CHART

!MIDDLE EXPONENTIAL SD BAND:
MidExpSD is ExpAvg.

!BOLLINGER BANDS FOR COMPARISON:
DnBB is [Lower BB].  !Lower Bollinger Band
UpBB is [Upper BB].  !Upper Bollinger Band
MidBB is simpleavg([close],xlen). !Middle Bollinger Band
!REPORT RULE TO DISPLAY VALUES:
ShowValures if 1.

!TRADING SYSTEM USING EXPPONENTIAL SD BANDS:
UpTrend if MidExpSD > valresult(MidExpSD,1).
BreakUp if [close] > UpExpSD.
BuyExpSD if UpTrend and BreakUp and valrule(Breakup=0,1).
ExitExpSD if [Low] < DnExpSD.  ! or UpTrend=0.

!TRADING SYSTEM USING BOLLINGER BANDS:
UpTrendBB if MidBB > valresult(MidBB,1).
BreakUpBB if [close] > UpBB.
BuyBB if UpTrendBB and BreakUpBB and valrule(BreakupBB=0,1).
ExitBB if [Low] < DnBB.  ! or UpTrend=0.

—Richard Denning
info@TradersEdgeSystems.com
for AIQ Systems

Zero In On The MACD

The AIQ code based on Barbara Star’s article in May issue of Stocks and Commodities “Zero In On The MACD,” is provided at www.TradersEdgeSystems.com/traderstips.htm, and is also shown below.
Sample Chart
FIGURE 7: AIQ. Here is a sample chart of VIAB with MACDhist, the color bars, and the 34- and 55-bar EMAs.
Figure 7 shows the MACD histogram on a chart of Viacom (VIAB) with the color bars and the 34- and 55-bar exponential moving averages (EMA). Note that I did not code the weighted moving average (WMA) but substituted the EMA for the WMA. I chose to view the chart of VIAB by running the EDS “Zero MACD.eds” on 3/14/2016 and examining the alert messages on the report “List.” VIAB is the only one on that date that showed a cross up on the MACDhist (see Figure 8 for a look at part of this report for 3/14/2016).
Sample Chart
FIGURE 8: AIQ. This shows part of the EDS custom report “List” that shows the MACDhist values on 3/14/2016, the color status, and any alerts that were generated for that day.
! ZERO IN ON THE MACD

! Author: Barbara Star, TASC May 2016

! Coded by: Richard Denning 3/14/16

! www.TradersEdgeSystems.com



! INPUTS:

macd1  is  12.

macd2  is  26.

macdSig is  1.



! INDICATORS:

emaST  is expavg([Close],macd1).

emaLT  is expavg([Close],macd2).

MACD  is emaST - emaLT.  ! MACD line

SigMACD is expavg(MACD,macdSig). ! MACD Signal line

MACDosc is MACD - SigMACD. ! MACD Oscillator



HD if hasdatafor(macd2) = macd2.

MACDhist is MACD.                                 ! plot as historigram

MACDblue if MACDhist > 0.  ! use these rules to color MACDhist

MACDred  if MACDhist < 0.  ! use these rules to color MACDhist

MACDcolor is iff(MACDblue and HD,"Blue",iff(MACDred and HD,"Red","White")). !for report list

List if 1.



!ALERTS:

EMA1 is expavg([close],34).

EMA2 is expavg([close],55).

xupEMA1 if [close] > EMA1 and valrule([close] < EMA1,1).

xdnEMA1 if [close] < EMA1 and valrule([close] > EMA1,1).

xupEMA2 if [close] > EMA2 and valrule([close] < EMA2,1).

xdnEMA2 if [close] < EMA2 and valrule([close] > EMA2,1).

xupMACD if MACDhist > 0 and valrule(MACDhist < 0,1).

xdnMACD if MACDhist < 0 and valrule(MACDhist > 0,1).

UpAlerts is iff(xupEMA1,"xupEMA1",iff(xupEMA2,"xupEMA2",iff(xupMACD,"xupMACD"," "))).

DnAlerts is iff(xdnEMA1,"xdnEMA1",iff(xdnEMA2,"xdnEMA2",iff(xdnMACD,"xdnMACD"," "))).

The code and EDS file can be downloaded from www.TradersEdgeSystems.com/traderstips.htm.

The Value of the ‘Perspective’ Indicator

Not every indicator that you look at needs to generate exact buy and sell signals.  There are many useful indicators that offer “perspective” more than “precision market timing.”  It can be very helpful to track some of these. The downside of course is that the more indicators you follow the more you can be susceptible to “analysis paralysis” – plus at some point you do have to have “something” that tells you “make this trade NOW!”
But the basis for considering tracking certain “perspective indicators” is that they can help to keep you from falling for those age-old pitfalls, “fear” and “greed”.  As the market falls – and especially the harder it falls – the more likely an investor is to start to feel fear.  And more importantly, to start to feel the urge to “do something” – something like “sell everything” to alleviate the fear. On the flipside, when things are going great there is a tendency to ignore warning signs and to “hope for the best”, since the money is being made so easily.
In both cases a perspective indicator can serve as – at the very least – a slap upside the back of the head that says “Hey, pay attention!”
So today let’s review one of my favorites.
The JK HiLo Index
OK, I will admit it is one of my favorites because I developed it myself.  Although in reality the truth is that it simply combines one indicator developed long ago by Norman Fosback and another that I read about in a book my either Martin Pring or Gerald Appel.
I first wrote about this indicator in the October 2011 issue of Technical Analysis of Stocks and Commodities magazine and I believe it is available via Bloomberg.
The calculations are as follows:
A = the lower of Nasdaq daily new highs and Nasdaq daily new lows
B = (A / total Nasdaq issues traded)*100
C = 10-day average of B
D = Nasdaq daily new highs / (Nasdaq daily new highs + Nasdaq daily new lows)
E = 10-day average of D
JK Hi/Lo Index = (C * E) * 100
In a nutshell:
*High readings (90 or above) suggest a lot of “churning” in the market and typically serve as an early warning sign that a market advance may be about to slow down or reverse.  That being said, a close look at Figure 1 reveals several instances where high readings were NOT followed by lower prices.  However, as a perspective indicator note the persistently high reading starting in late 2014.  This type of persistent action combined with the “churning” in the stock market could easily have served as a warning sign for an alert investor.
*Low readings (20 or below) indicate a potential “washout” as it indicates a dearth of stocks making new highs.  Readings under 10 are fairly rare and almost invariably accompany meaningful stock market lows.
Figure 1 displays the Nasdaq Composite (divided by 20) with the JK Hi/Lo Index plotted since 2011.
1
Figure 1 – JK HiLo Index (red line) versus Nasdaq Composite (/20) since 2011
Regarding the difference between a “timing” indicator and a “perspective” indicator, note the two red lines in Figure 2.  The JK HiLo Index first dropped below 20 on the date marked by the first red line.  It finally moved back above 20 on the date marked by the second red line.  2
Figure 2 – JK HiLo Index (red line) versus Nasdaq Composite (/20) since 2015 (Courtesy AIQTradingExpert)
Can we say that the JK HiLo Index “picked the bottom with uncanny accuracy”?  Not really.  The Nasdaq plunged another 10% between the first date the indicator was below 20 until the actual bottom.
Still, can we also say that it was useful in terms of highlighting an area where price was likely to bottom?  And did it presage a pretty darn good advance?  I think a case can be made that the answers to those questions are “Yes” and “Yes”.
Summary
The bottom line is that while there was a great deal of fear building in the market during January and February, an indicator such as this one can help alert an investor the fact an opportunity may be at hand.
Jay Kaeppel
Chief Market Analyst at JayOnTheMarkets.com and TradingExpert Pro client