All posts by admin

RSI Everything (Part 2)

EDITORS NOTE: The AIQ Expert Design Studio file for Jay’s RSI Everything part 1 and part 2 can be downloaded from here.  
In RSI Everything (Part 1) I detailed two indicators respectively dubbed “RSIAll” and “RSIROC”.  These two indicators make up half of a combined indicator I refer to as “RSI Everything”.
In Part 2 I will detail the last 2 RSI based indicators and then add them together to create one – OK, for lack of a better phrase – “Mega”  RSI indicator.  Traders may consider each of the four indicators separately, or combine them into one indicator as I do a little later in this piece.
Measure #3. RSIq2
I am not exactly how I came to name this one RSIq2, but for better or for worst there you have it.  The initial calculations for this RSI variation are very similar to those for RSIROC detailed in Part 1.  The primary difference is that this indicator uses a traditional 14-day RSI day window, and it adds an additional calculation to the mix at the end.  The AIQ code for the RSIq indicator appears below followed by the gist of it in English.
ThreeDayROCRSI14 is (RSI14-valresult(RSI14,3)).
RSIPlusROCRSI14 is (RSI14-50)+ThreeDayROCRSI14.
RSIROC14 is (expavg(RSIPlusROCRSI14, 2)).
RSI14mid50 is RSI14-50.
RSIq2 is (RSIROC14+RSI14mid50)*2.
In some semblance of English:
Line 1 subtracts the 14-day RSI value of 3 days ago from today’s 14-day RSI value (to essentially factor the trend of the 14-day RSI into the mix).
Line 2 subtracts 50 points from today’s 14-day RSI and then adds in the value calculated in line 1. (this creates an indicator that fluctuates above and below zero rather than using 50 as the midpoint as with the traditional RSI).
Line 3 creates a two-day exponential moving average of values calculated each day in Line 2 (i.e., yesterday’s RSIROC14 value is multiplied by 0.6667 and today’s RSIROC14 value is multiplied by 0.3333 and the two values are added together to create today’s RSIROC14 value.
Line 4 once again subtracts 50 from today’s 14-day RSI value.
Line 5 simply adds together the values calculated in Lines 3 and 4 and then multiplies the sum by 2 to arrive at the RSIq2 value.
An example of RSIq2 plotted again an actual security appears in Figure 1.1
  Figure 1 – Ticker SPY with RSIq2 indicator (Courtesy: AIQ TradingExpert Pro)
In general, readings below -64 in an uptrend signal a potentially oversold situation and readings above 64 in a downtrend signal a potentially overbought situation.  But as with all of these indicators, traders are encouraged to experiment with different “cutoff” values and also with various entry triggers.
Measure #4. Tom DeMark’s Range Expansion Index (TDREI)
Tom Demark is a well known analyst and system and indicator developer.  One limitation of the RSI indicator is that if price moves up or down the RSI will fluctuate even if price movement is not very meaningful.  DeMark’s REI is an attempt to reduce the influence of price movements that are little more than “noise”.  Rather than just noting the change in price from close to close each day, REI compares the high or low of certain days to the high or lower of certain other previous days to update the indicator value each day.  The AIQ code for TDREI is as follows:
Hitoday is [high].
H2 is val([high], 2).
H5 is val([high], 5).
H6 is val([high], 6).
Lotoday is [low].
L2x is val([low], 2).
L5 is val([low], 5).
L6 is val([low], 6).
Closetoday is [close].
C7 is val([close], 7).
C8 is val([close], 8).
TD1 is [high] – h2.
TD2 is [low] – l2x.
TD3 is iff(([high] >= l5 or [high] >= l6) and ([low] <= h5 or [low] <= h6), 1, 0).
TD4 is iff((h2 >= c7 or h2 >= c8) and (l2x <=c7 or l2x <=c8), 1, 0).
TD6 is td1 + td2.
TD5 is iff((td3 + td4) >=1, td6, 0).
TD7 is abs(td1) + abs(td2).
TDREI is ((td5 + valresult(td5, 1) + valresult(td5, 2) + valresult(td5, 3) + valresult(td5, 4)) / (td7 + valresult(td7, 1) + valresult(td7, 2) +valresult(td7, 3) + valresult(td7, 4))) * 100.
I am not going to attempt to explain the REI calculations.  If you want to know the particulars please follow this link: www.Google.com.  Then type in DeMark Range Expansion Index.
Figure 2 displays ticker XLF with the REI indicator plotted below.2
Figure 2 – Ticker XLE with DeMark’s REI indicator (Courtesy: AIQ Trading Expert Pro)
As with the previous indicators I’ve discussed the general idea is about the same – i.e., negative readings within an uptrend signal potential buying opportunities, positive readings within a downtrend signal potential shorting opportunities.
RSI Everything
So we have now detailed four different (albeit similar) RSI based indicators.  Typically the next question many traders will ask is “which one is the best to use for trading?”  And in fact some traders may have better success focusing on one of the four indicators rather than combining them as we are about to do next.  But the reality is that each indicator gives its fair share of excellent trading signals and its fair share of just plain wrong trading signals.  So for the purposes of this exercise instead of trying to “choose” we will instead “combine.”
The indicator I call RSIEverything is calculated simply by summing the daily value for each of the following indicators and dividing by four:
*RSIAll-50
*RSIROC
*RSIq
*REI
The first two were detailed here and the second two are detailed above.
Figures 3 through 6 display RSIEverything plotted against a handful of various securities. 3
Figure 3 – Ticker XLE with RSI Everything (Courtesy AIQ TradingExpert Pro)
4
Figure 4 – Ticker SPY with RSI Everything (Courtesy AIQ TradingExpert Pro)
5
Figure 5 – Ticker TLT with RSI Everything (Courtesy AIQ TradingExpert Pro)
6
 Figure 6 – Ticker WYNN with RSI Everything (Courtesy AIQ TradingExpert Pro)
Summary
As with any oscillator the bad news is that there is no one magic cutoff value that – once reached – guarantees that a price reversal is imminent.  Still, much money can be made by “buying the pullback in an advance’ and/or shorting the rally in a decline.
Looking for a buying opportunity when:
1) Price is above the 200-day moving average and;
2) RSI Everything is below ???  -32?  -48?  -64?
Appears to make sense.  So does looking for a shorting opportunity when:
1) Price is below the 200-day moving average and;
2) RSI Everyting is above +32? +48? +64?
The key questions for a trader to answer are “what indicator cutoff values to use to signal an opportunity” and “enter immediately or wait for a reversal or a breakout above the latest high (or the latest 2-day high”?  etc.
Which reminds me to mention:
Jay’s Trading Maxim #65: Getting an indicator to signal “buy” or “sell” is the easy part. In the long run, how and when you actually enter into a new trade and how you manage that trade once entered is what separates the winners from the losers.
Jay Kaeppel  
Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
http://jayonthemarkets.com/

RSI Everything (Part 1)

A long time ago a friend of mine worked for a professional sports franchise.  However, as low man on the totem pole he didn’t make a lot of money.  So to supplement things he got a job at a small local television station as the Producer for a show that featured local bowling on Sunday mornings.  No, seriously.  And he wasn’t the only guy trying to “make it.”  The guy who was hired as the actual on air broadcaster had aspirations too.  So he would routinely treat each frame as something akin to the ninth inning of the seventh game of the World Series.  As a result he sometimes went a little overboard on the hyperbole.  To wit:  One day when the “local legend” – a woman who had won every local bowling title and award that was ever created – stepped up to the line with her ball in hand, the broadcaster intoned for all (roughly 12) viewers to hear, “Anything that you can do with a bowling ball, this woman has done!”
My poor friend almost peed his pants.
Anyway, the only reason I bring this up is that as a still non-recovering “numbers geek” (“Hi, my name is Jay”), I sometimes feel like “anything you can do with a couple of numbers, I’ve done it.”  One case in point is the simple RSI (Relative Strength Index) indicator. Created by Welles Wilder I’m guessing 40 some odd years ago, this simple oscillator has helped to trigger roughly a bazillion trades.  But some of us are not content to leave well enough alone.  And so for better or worse we torture the darn thing until it is “different” (and hopefully – though not necessarily – better, for “better” is in the eye of the beholder).  So (True Confession Time) I have an indicator I follow that I’ve called RSI Everything (for reasons that will become painfully obvious very soon), which combines four, um, variations, on the venerable RSI.  i will cover the first two in this article .
There are many ways to calculate these things but in this article I will be including code from AIQ Expert Design Studio.  Not much in the way of “rocket science” so the indicators can be easily adapted by those of you using one of the roughly twelve bazillion other charting packages available these days.
Measure #1. RSIAll
Figure 1 displays ticker AAPL with the 2-day, 3-day and 4-day RSI indicators drawn below the bar chart with the values for each appear in the lower right hand corner. 1
Figure 1 – AAPL with 2-day, 3-day and 4-day RSI indicators (Courtesy: AIQ TradingExpert Pro)
In a nutshell, the 2-day is more sensitive than the 3-day and the 3-day is more sensitive than the 4-day.  Most traders pick their “favorite” day window and stick with it.  Nothing wrong with that.  But RSIAll is calculated simply by taking the latest value for the 2-day, 3-day and 4-day RSI and dividing by three.  This appears in Figure 2.2
Figure 2 – AAPL with RSIAll indicator (Courtesy: AIQ TradingExpert Pro)
In a nutshell, low RSIAll readings within an uptrend are considered “bullish”, while high RSIAll reading within a downtrend are considered “bearish.”  Of course, the trick is defining how low is “low” and how high is “high”.  As with most indicators there are no “magic numbers.”  That being said, 15 on the oversold side and 85 on the overbought side are probably a good place to start.
The AIQ Code for RSIAll is as follows:
Define days2 3.
U2 is [close]-val([close],1).
D2 is val([close],1)-[close].
AvgU2 is ExpAvg(iff(U2>0,U2,0),days2).
AvgD2 is ExpAvg(iff(D2>=0,D2,0),days2).
RSI2 is 100-(100/(1+(AvgU2/AvgD2))).
Define days3 5.
U3 is [close]-val([close],1).
D3 is val([close],1)-[close].
AvgU3 is ExpAvg(iff(U3>0,U3,0),days3).
AvgD3 is ExpAvg(iff(D3>=0,D3,0),days3).
RSI3 is 100-(100/(1+(AvgU3/AvgD3))).
Define days4 7.
U4 is [close]-val([close],1).
D4 is val([close],1)-[close].
AvgU4 is ExpAvg(iff(U4>0,U4,0),days4).
AvgD4 is ExpAvg(iff(D4>=0,D4,0),days4).
RSI4 is 100-(100/(1+(AvgU4/AvgD4))).
RSIAll is (RSI2+RSI3+RSI4)/3.
Measure #2. RSIROC
OK, for the record RSIROC is an abbreviation of another indicator I concocted with an even more arcane name titled RSIROCExpAve.  The code (and a relatively weak attempt at an explanation in English) follows below:
ThreeDayROCRSI is (RSI3-valresult(RSI3,3)).
RSIPlusROCRSI is (RSI3-50)+ThreeDayROCRSI.
RSIROC is (expavg(RSIPlusROCRSI, 2)).
So what is that all about?  This indicator basically builds in the 3-change in the RSI indicator itself to measure the momentum of RSI.  OK, here goes:
Line 1 subtracts the 3-day RSI value from 3 days ago from today’s 3-day RSI value.
Line 2 subtracts 50 points from today’s 3-day RSI and then adds in the value calculated above.
Line 3 creates a two-day exponential moving average of values calculated each day in Line 2 (i.e., yesterday’s RSIROC value is multiplied by 0.6667 and today’s RSIPlusROCRSI value is multiplied by 0.3333 and the two values are added together to create today’s RSIROC value.
Example:
-Yesterday’s RSIROC value was 45
-Today’s 3-day RSI is 30
-3-day value three days go was 60 then:
ThreeDayROCRSI = (30-60) or -30
RSIPlusROCRSI is (30-50) + (-30) = -50
RSIROCExpAve is ((45 * 0.6667) + (-50 * 0.3333) = 13.33
Ticker GOOG with the RSIROC indicator plotted appears in Figure 3. 3
Figure 3 – Ticker GOOG with indicator RSIROC (Courtesy: AIQ TradingExpert Pro)
In a nutshell, the higher above 0 the RSIROC reading the more overbought the security in question, and the lower below 0 the RSIROC reading the more oversold the security in question.  Readings of +60 or more and -60 or less seem like reasonable areas of “extreme” readings.  The most likely use for this indicator is to look for low readings when price is above the 200-day moving average (as a potential buying opportunity) and for high trading when price is below the 200-day moving average (as a potential shorting opportunity).
n RSI Everything Part 2 I will detail the other two parts of the indicator and how the pieces go together.
In the meantime, don’t try anything crazy with a bowling ball.
Jay Kaeppel  
Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
http://jayonthemarkets.com/
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.

Another VIX(Like) Oversold Indicator

A while back I wrote about some “VIX-like” indicators that can be applied to stocks, ETF, futures, etc.  Well, today let’s add one more to the mix.  This one – which for (clear) lack of a better name –I refer to as VixRSI14x (Note to myself: you really have to come up with a better way of naming these things).
It combines a “vix-like” indicator with the standard 14-day RSI.  Also, whereas VIX moves higher as price declines, I flip this one on its head to create negative indicator readings align with price declines and oversold conditions.
The Calculations
A word of warning: if indicator calculations make your head hurt you might want to skip this section and go down to the charts below. The VIXRSI14x indicator combines the standard 14-day Welles Wilder RSI with Larry Williams VixFix indicator as follows.
A = Highest close in last 22 trading days
B = A – today’s low
C = (((B – A) / A) * 100) + 50
VixFix = C
The 14-day RSI is calculated using the standard Wilder RSI formula found in most charting programs (AIQ TradingExpert code is found below)
VixRSI14 is calculated as follows:
D = 3-day exponential average of Daily VixFix readings
E = 3-day exponential average of daily 14-day RSI readings
F =D/E
VixRSI14 = F
This indicator as designed will typically rise in value as prices decline.  In order to create an overbought/.oversold indicator that moves in line with price, the value is inverted as follows:
VixRSI14x = ((1/VixRSI14)*100)-100.
(Hey I warned you to skip ahead to the charts)
The following is code or AIQ TradingExpert Design Studio:
!VixFix calculations
hivalclose is hival([close],22).
vixfix is (((hivalclose-[low])/hivalclose)*100)+50.
!14-day Rsi calculations
Define days14 27.
U14 is [close]-val([close],1).
D14 is val([close],1)-[close].
AvgU14 is ExpAvg(iff(U14>0,U14,0),days14).
AvgD14 is ExpAvg(iff(D14>=0,D14,0),days14).
RSI14 is 100-(100/(1+(AvgU14/AvgD14))).
VixRSI14 is expavg(vixfix,3)/expavg(RSI14,3).
VixRSI14x is ((1/VixRSI14)*100)-100.
The Resulting Indicator
Now I would like to claim that VixRSI14x is a highly accurate timing tool that picks tops and bottoms with uncanny accuracy.  And the truth is, at times it sorta does.  On the other side of the coin one could probably make an argument that this is just one more “Overbought/Oversold” indicator.  I will leave the more industrious to draw their own conclusions.
A few “suggestions” for highlighting potential bullish opportunities:
1) Consider looking for situations when SPY is oversold or bouncing off of a low as a catalyst to look for buy signals among the stocks and/or ETFs you follow (One possibility is to look for VixRSI14x to drop below -16 and then turn up).
2) When looking at individual stocks and ETFs look for upside reversals from -32 or below.
3) Look for signals on stocks/ETF that are above their 200-day moving averages.
4) Consider taking profits on the first good “pop” and letting the rest ride.
A Few Charts
On 2/2/15 the VixRSI14x indicator for ticker SPY reversed to the upside after dropping below-16. See Figure 1.
1Figure 1 – SPY with -16 or lower oversold VixRSI14x signals (Courtesy: AIQ TradingExpert)
A sampling of stocks that met the criteria listed above on 2/2/15 appears in Figures 2 through 5 below.
2Figure 2 – Ticker UNTD (Courtesy: AIQ TradingExpert)
3Figure 3 – Ticker VRSN (Courtesy: AIQ TradingExpert)
4Figure 4 – Ticker WDC (Courtesy: AIQ TradingExpert)
5Figure 5 – Ticker YHOO; no upside follow through from multiple signals  (Courtesy: AIQ TradingExpert)
Some of these experienced an immediate “pop”, while others – most notably YHOO – have gone nowhere.  This is fairly typical.  As with most things in trading, some signals work while others do not. As with any kind of oversold indicator there is never any guarantee that every signal for every stock will be followed by rainbows and unicorns.  This suggests that industrious traders might consider looking for some sort of “confirming” indicator to highlight trades that they believe have the best potential for moving higher.
Summary
So is “VixRSI14x” the “next big thing”, or simply just another oscillator that rises when price rises and falls when price falls?  My experience suggest that it is “someplace in between.”
My experience also suggests that that  is not necessarily a bad place to be.
Jay Kaeppel  
Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
http://jayonthemarkets.com/
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.

Global market breakout starts

February 22, 2015: Global market breakout starts
This post from Donald Dony (AIQ seminar speaker). 
After over six months of
concern that the 6-year old world bull market was coming to an end, a
collective upside breakout has developed.

Lead,
first by the U.S. markets, and then one-by-one, global equity markets started
to follow and advance.

Japan’s Nikkei, one of the key world indexes, broke to a new high in Q4 and
then advanced to a new 10-year high in February.

The collective STOXX Europe 600 surged to a new post 2009 level in Q1 and is
set to retest the old 2007 high of 400.31 in the weeks to come.

Even commodity-laden indexes like the Australia’s All Ordinaries (ASX) and
Canada’s TSX, are breaking out and advancing to new levels.

Numerous other key world indexes such as India’s BSE, Hong Kong’s Hang Seng and
China’s Shanghai are also following in the upward trend.

Bottom line: We see this positive outlook continuing into Q2 and believe many
world indexes will achieve new highs in 2015.

Investment approach: We suggest investors remain long in 2015 and weight
portfolios toward non-commodity industry groups and indexes. The lower chart
highlights our rationale. The S&P 500 has outperformed the Commodity
Research Bureau Index since 2012.

Donald W. Dony, FCSI, CFTe, MFTA
D. W. Dony and Associates Inc.
4973 Old West Saanich Rd.
Victoria, BC  V9E 2B2
Ph. 250-479-9463
Fax. 250-479-9417

www.technicalspeculator.com

Detecting Flags In Intraday Charts

The AIQ code based on Markos Katsanos’ article in Stocks & Commodities magazine, “Detecting Flags In Intraday Charts,” is provided at www.TradersEdgeSystems.com/traderstips.htm, and is also shown here:

!DETECTING FLAGS IN INTRADAY CHARTS

!Author: Markos Katsanos, TASC December 2014

!Coded by: Richard Denning 10/18/14



!USER DEFINED FUNCTIONS:

C is [close].

Name is description().



!COMPLETED FLAG PATTERN:

FLAG is [Flag].

FLAG_breakoutup if FLAG > 0.

FLAG_breakoutdn if FLAG < 0.



!EMERGING FLAG PATTERN:

e_FLAG is [eFLAG].

e_FLAGup if e_FLAG > 0.

e_FLAGdn if e_FLAG < 0.



!REPORTS TO LIST ALL FLAG PATTERS:

ShowAllCompleted if C>0 and FLAG <> 0.

ShowAllEmerging if C>0 and e_FLAG <>0.

The AIQ program has a chart-pattern recognition module that operates only in daily mode. I am providing code to find both completed flag patterns and also emerging flag patterns.
In Figure 10, I show a chart of G-III Apparel Group Ltd., which shows a flag pattern completed on June 25, 2014 (green up arrow), when the price broke above the down-sloping flag top. Although the volume was above average on the breakout, the follow through was lacking.
Sample Chart

FIGURE 10: AIQ. This sample chart shows G-III Apparel Group Ltd. (GIII) with a completed flag pattern (indicated by the green up arrow).
Note that I did not code exits for the pattern, as the built-in exits can be used to experiment with the flag pattern entry. Note also that the AIQ version of flags does not match exactly the intraday flags that are defined by Katsanos in his article.
—Richard Denning
info@TradersEdgeSystems.com
for AIQ Systems