Long Term Trading System (aka IRA System)

In this post I'd like to present a basic mechanical trading system for Long Term positions suitable for EOD or weekend traders: "Trend_LT". This particular system is intended for daily or weekly time frames and is based on PPO (or MACD). The system uses the inclination or declination of the PPO-/MACD-signal line as a proxy for the LT direction of the trend. The system also has a build in filter to prevent going short during counter trend corrections in a LT uptrend.

The "Trend_LT" system encompasses three possible positions:
- long, i.e. a position in the eft SPY;
- short, i.e. a position in the eft SH or perhaps even better: HDGE;
- neutral, because cash is position too!

The rules of this system are short and simple:
1. Long when EMA5 of (EMA13 - EMA55) is rising.
2. Short when EMA5 of (EMA13 - EMA55) is falling and price(=close) < SMA89.
    So no shorts when price >= SMA89.
3. Use the extreme point rule for entry/exit stops to minimize whipsawing.

A chart of the system showing some 1,000 trading days on the SPX:

A chart of the system with 1,000 weeks of SPX depicted:

Thrill Rides by PayPal

[Updates at end of post]

Last summer my two sons and I were having "fun" in some of the roller coasters of Six Flags/Magic Mountain near LA. Think of telling names like "Viper", "Scream", "X2" and of course the 26 stories high "Goliath". We were looking for thrills and we sure found them. Oh yeah.

You know what beats a roller coaster thrill ride? Ask any blogger. Nothing in the world is so thrilling, let alone encouraging, as that “Notification of Donation Received” e-mail from PayPal. 

Last X-mas my youngest son (14) managed to turn his pc into a private server for MineCraft. Finally he and his internet friends now were able to play the game on a fairly fast server in a safely moderated environment. So I decided to set up a little blog on his behalf for this particular MineCraft server. Guess what? Kids from around the globe started donating! Kids! A boy from Australia who was living in Thailand with his father was first with $40 (made available by his dad). A youngster from Norway followed suit with $30. Next was a kid from New York with another $40. You had to see my kids face when I showed him those “Notification of Donation Received” e-mails from PayPal. His X-mas just couldn't be better! 

With these newly earned funds I convinced my son into renting an external 24/7 game server. So the kid from Thailand could built his stuff in MineCraft on more decent times of the day, while my son was sleeping (and his pc was offline). And so we did.

Over to my blog. Since its inception by the start of 2012 it registered well above 10,000 page views. Site statistics show how popular some indicators are. People are especially over the moon on the Hurst Channels: "Awesome!", "The best indicator I ever came accross", to mention a few reactions I got. Of course for a blogger like me it's great to receive such tributes. But at times I wonder how nice it would be when people would share some piece of the benefit they rape from these indicators I make available for free. Try to realize the amount of dedication, effort and time I invest in them. Moreover I supplied customized charts on request and even did a screencast video or two on how to set up indicators in TOS. All to hardly any effect.

Did nobody show his generosity then? Until now exactly three (yes, 3!) commendable persons did (hat tip to: Daniel, Martin and Jeff). So after some 12,000 views and a staggering donation ratio of 1:4,000 I just felt the urge to rattle of the tip jar on my behalf. Once.

Notably for these two reasons I started my blog:
- I believe strongly in the concept of sharing so we all may benefit.
- I want to help my readers to gear up their trading results.

Let's focus on the "benefit" aspect. On many sites "Holy Grail" indicators are offered for outrageous prices and you even can't test drive them before buying. Or with respect to the the Hurst Channels: to see only some EOD-charts of a limited set of indexes, you would have to take a monthly subscription elsewhere. Inversely I made the Hurst study code available for any and all, so people are able to use it on the instruments and for time frames they can pick themselves and that suit their needs best. For use EOD or even during RTH. All for free and no strings whatsoever.

Once in a blue moon a visitor shares ideas on improving the code (thanks again Martin, Larry to name some of you). That's the other side of the "benefit" aspect I anticipated and hoped for by starting this blog. I want you to know how much I appreciate those rare, precious moments when my ideas are picked up and new insights or possibilities are shared in return. That's how progress is achieved and we may benefit together even more.

Don't get me wrong. By rattling my tip jar, I don't intend to offend anyone, that's just so not me. Every single visitor to my pages is as welcome as can be and stays so, whether my tip jar gets a fill or not. I just wanted to force an open door, to let y'all know I'd be much obliged if now and then some of you would make this blog worth my while by hitting the tip jar for $10, $20 or whatever amount you find suitable.  Au revoir!

[Update 11/13/12: Charles, thanks for raising the ratio to 1:3,000 ;) and of course for the thrill! ]
[Update 11/14/12: Matthew, I appreciate your support.]

Let's make some noizz: Colors, Signals and AlertSounds for Williams %R

Williams %R is a momentum indicator measuring overbought and oversold levels. It was developed by Larry Williams and compares a stock's close to the high-low range over a certain period of time, usually 14 bars. The indicator is also classified as an oscillator since the values fluctuate between 0 and -100. Williams %R is helpful to determine overbought and oversold conditions as well as reversals in market trends.

Per special request I adapted the Williams %R indicator available in thinkorswim's thinkDesktop. The full "suite" consists of three studies:
- WilliamsPercentR_Colors: the indicator in the sub pane with colored clouds and an average too.
- WilliamsPercentR_Signals: for plotting arrow signals to indicate reversals.
- WilliamsPercentR_Alerts: for sound alerts and notifications in Message Center (see chart).


Improved FlowPrice for Hurst Oscillator

To better reflect price extremes the FlowPrice indicator - the core element of the Hurst Oscillator - is improved. The study code is available for download and import into thinkDesktop at the bottom of the July 25th posting on the Hurst indicators.


Hurst Channels and Oscillator

[Update1: New charts added, partly with double channels.]
[Update2: Improved FlowPrice indicator for the Hurst Oscillator.
                 Due to the massive interest in Hurst's indicators, they are now also available as download
                 for direct import into TOS. See bottom of this post.]
[Update3: User selectable coloring of the ExtrapolatedMA added.]

In the late 60's a NASA aerospace engineer J.M. Hurst published ‘The Profit Magic of Stock Transaction Timing’. Ironically, his book, by some considered the best book ever written about stock market cycles and swing trading, became available during the deepest and most extended Bear Market since the Great Depression. From 1972 on brokers couldn't give blue chip stock away in a Wall Street lunchroom. There was no market for a book by a stock market timer, and the book became a hidden treasure.

By the time stock market investing became sexy again Hurst was long forgotten old news. Peter Eliades and Mark Hulbert picked up the banner of Hurst cycle analysis and stock market cycles. To quote Peter Eliades:
“Sometimes a single moment changes all the ones that follow. For me it was the discovery of Hurst’s book, ‘The Profit Magic of Stock Transaction Timing’. It was responsible for changing my life.”

Sigma Band Break System

The Greek non-capital letter σ (sigma) is the symbol for standard deviation, so the word sigma is often used interchangeably with standard deviation. Standard deviation is used as a measure of the degree of spread in a population. John Bollinger used standard deviation in his famous indicator with two bands placed above and below a simple or exponential moving average as the midline.

The Sigma Band Break System takes advantage of the price spread by assuming that trending prices will form a channel, be it up or down sloping, in which prices will be contained for the duration of that particular trend. See as an example the daily chart of the SPX:


Notice how the different bands on more than a few occasions offer support or resistance. Trending or "impulsive" up or down moves are often confined between 1 sigma and 2 sigma bands.

Fibonacci Rainbows

In honor to the celebrations in Canada today and in the US on the 4th, it's time for fireworks.

Suppose the algo's do their calculus in Fibonacci numbers along exponential moving averages and this spectacle of rainbows could even paid off very well. Happy celebrations!


Followup ElliottWaveOscillator: Breakout Bands added

As a followup from last weeks posting the ElliottWaveOscillator is extended with Breakout Bands (only in standard mode) such as eSignals AdvancedGetOscillator. Tribute goes to Richard Houser from the TOS_thinkscript group for providing the ported thinkscript code.


ElliottWaveOscillator revisited

[UPDATE: EWACS added. See end of posting]

On the board Pretzel Logic's offers for its members some amazing people are gathered. One of them (to say the least) makes great calls and often posts charts to outline them. On no few occasions the GET Oscillator is depicted on his charts (see example). So I figured: let's revisit the ElliottWaveOscillator.

On most platforms the Elliott Wave Oscillator is the difference between a 5-period simple moving average and a 35-period simple moving average. Some platforms use the Fibonacci number 34 instead of 35. The indicator is then depicted below the pricechart as a histogram that oscillates above/below a zero line.

Most tops or bottoms show a divergence between price and the oscillator. A higher price is accompanied by a lower spread in the oscillator, while a lower low in price goes along with a higher low on the oscillator. This signal is especially reliable after the oscillator has pulled back to the zeroline or did cross that line in some extend to the opposite direction as a sign of a countertrend and then turns back in the direction of the larger trend while building the aforementioned divergence.


So you think you can count. But can you count waves?

Followers of R.N. Elliott do count waves. This week Pretzel Logic's Market Charts and Analysis (see blogroll) published a two part Introduction on understanding Elliott Wave Theory. After reading that 101 on counting waves, a handy tool for counting waves and thus analyzing the wave structure would come in handy, right?

It happens some years ago Elliott Wave International's chief commodity analyst and "Futures Junctures Service" editor Jeffrey Kennedy" presented his Trend Analyzing Tool in a webinar. On Tuesday, 22 December 2009, EWI disclosed the formula to the public on their website.
(Screen shot of the "Jeffrey Kennedy's Trend Analyzer Tool", or ,JK_TA for short, Fast and Baseline)

About bottoms, liquidity and risk: HIO, MHCAX and HIO:TLT

Last week and weekend some appealing trading indicators were put into the spotlights on Daneric's board (see blogroll), all of them (coincidence or not) being invented by Tom McClellan. Let's do a quick concise review and add and extra indicator.

First: HIO's 2-day ROC% as a bottom indicator
HIO is a high yield bond fund. Every time its 2-day ROC% has gone below -2 (green dashed line) and turns up, it's marked a significant stock market bottom.

Let's add some arrows for better analysis:

Stocks about to hit bottom?

Looking at the Call/Put ratio and NYSE breath, stocks may hit bottom in the next couple of days. Fear has taken over from complacency and has already entered extreme territory.


[Update:] Another piece of evidence: $NYMO is deeply oversold too. A change in momentum as shown by TrendXplorer will be the signal of a bounce or reversal.

PPO ROC'n Roll

[It has been a while since my last post, but as you can see, I had to attend a dancecourse :)]

You know MACD. Meet its cousin: PPO or PercentagePriceOscillator. Simply put: PPO is the value of MACD divided by the longer moving average. This result is then multiplied by 100 to express the value in a percentage. Compared to MACD, PPO is more suitable for long term analysis.

Just like MACD, PPO can have a histogram too. Trading PPO in the conventional way by the crossings of the PPO-line and the Signal line, may result in chasing trades, because PPO, just like MACD, suffers more or less lag. The amount of lag differs greatly depending on the settings used, but while fast settings reduce lag considerably, they also come with the risk of whipsawing.

Why not use the histogram differently and reduce lag considerably? Why not make it dynamical to express the ROC of the PPO-line? Instead of showing the difference between the PPO-line and its Signal line, let the histogram show the daily Rate of Change of the PPO-line itself. The result is a PPO with a built-in Early Warning System combined with a nice divergence feature!

thinkscript code for McClellan Summation Index and Histogram

The McClellan Summation Index works well to help investors identify important turning points in the market. The Summation Index gives a longer term signal when it confirms, or fails to confirm, the trend in the stock market itself. It can provide an early signal of a trend change too. thinkDesktop offers the Summation Index as a standard study and with some thinkering we have a histogram too.


The chart shows two studies, which can be used separately. The studies are to be used on the daily time frame. Like the standard TOS study NYSE, NASDAQ or AMEX can be selected.

Summation Indexes are rolling over

[The thinkscript studies will be soon available for download or "copy/paste".]

State of the Markets

This weekend market update holds an extensive review of the weekly and daily status of TrendXplorer in the various markets.

The weekly SPX painted a bullish cross on the 10 and 40 SMA's, on the daily chart the equivalents of the 50 and 200 SMA's a cross is very close, but did not happen (yet?). During the last 10 years every bullish cross was followed by a prolonged period of rising prices. Only in Spring 2002, the bullish cross was soon followed by a bearish one. At that time however the 200 SMA was firmly downsloping, while right now it is fairly flat with some positive bias. Notice on the daily, momentum is waning somewhat and unlike the $DJI, SPX did not take out its July tops.

The Dow did take out its July 2011 double top and the high of this week is only some 34 points under the May 2, 2011 top.

The NDX did take out its high of last July and had follow through during this market week. Notice the steep rise during this last month. What goes up fast goes down fast? The weekly and daily charts show quite some negative divergence.

"Not impossible. Inevitable. Goodbye, Mr. Anderson."

Tomorrow Silver will see its daily 50MA cross the 400MA. It is inevitable! The MA-pair differ only 0.1 point, while the 400MA is rising 0.3 points each day and the 50MA declines 0.1 point. The last time such a down cross occurred was in mid September, 2008. Further the 50, 100, 150 and 200 MA's (not shown on chart) are in bearish alignment. Price is stalling and mayor resistance is building with the both the 50 and 400 MA just overhead. So mr. Anderson, are you going down or do you play your Neo tricks?

In XLF, the 200MA held as resistance. In Gold the non-triggered sell signal is cancelled. NDX shot up, causing a new buy signal to be issued. On the US Dollar notice the 8th touch of the up sloping tendline. TLT is hovering around its 50MA.

Hidden negative divergence in XLF, Gold battling with daily 200MA

While TrendXplorer still has XLF in an uptrend, it is showing hidden negative divergence (see chart). The lower high in price (a hanging man doji) was accompanied by a higher high in momentum and last Friday momentum was waning again. This concurs with the weakness stocks are showing at the moment. Prices stalled and the new buy signal in NDX (not shown) was canceled by a red square (see Trading the Trend for explanation)
With US markets closed today Gold futures retreated a bit, battling with their daily 200MA. Notice the re-sell signal of last Thursday on the second chart. It looks like Gold has found its resistance again.


Implosion of the inverse correlation in the markets?
To measure is to know

A correlation comparison study on USD/EUR, SPX, Gold, Oil, AUD/USD and VIX

The other day a visitor on my blog stated the markets inverse correlation with the US Dollar had pretty much imploded. In the meantime AlbertaRocks also published his peace on this subject: USD - "Inverse" About To Become The Norm
To be able to validate this statement in a better way than eyeballing the charts, I wrote a thinkscript study that compares the trend in a given stock, index or currency against another showing the correlation, be it positive or negative, in a subpane. That is: when both rise or decline in tandem, positive correlation is at hand, signaled by a green flag. Otherwise negative correlation is assumed, signaled by a red flag. Because of data issues I had to use the inverted EUR/USD spot prices as a proxy for the US dollar.

SPX : USD/EUR
My measurements show that on a week to week basis green and red flags fly all over the place in an erratic, chaotic way. On a day to day basis the randomness seems to be even greater. So any meaningful correlation on these timeframes is virtually non existent, neither negative nor positive (see upper subpane on charts).

When correlation is measured by the waning and waxing of the weekly 10-period moving averages (50-period daily moving averages), the most extensive conclusion in my judgement would probably be that there are times when values move in tandem or non-tandem for a while, but both connections and disconnections seem to "just" happen. Whether the markets rise or fall, is of no difference too. And tandems fall apart just as quick as they pair up together, seemingly for no obvious reason.

Only when measured on the larger timeframe of a 40-period moving average (200 days) the quite popular believe that there was inverse correlation until recently turns out to be only partly true. My TOS-charts go back 20 years and until April 2002 positive correlation had the upper hand. Since then inverse correlation took over as the prevailing trend. But notice also during these recent years there are weeks and weeks on stretch with positive correlation.


Hanging man doji day for stocks, oil leaking

Both SPY, DIA, QQQ and IWM printed a hanging man doji on the charts, with a suspicious new buy signal on the QQQ's (see chart). So the rise in stocks is struggling.
UUP was fairly lower, while (of course) its mirror: FXE went higher. Perhaps the most interesting was oil, which took quite a drop (see chart).


Stocks fail to rise, cover signal on SLV

The market was slow, not to mention dull, today. Stocks stalled, in spite (yes!) of a rising US dollar. Only one thing of importance to mention: TrendXplorer issued a cover signal on SLV. GLD is putting its sell signal to the test.

And now something completely different:
Hat tip for DV for being the first donor to this blog. Thanks for your generosity, DV!



[Update: Charts added of SLV and GLD]

Stocks rise on lackluster volume

After a few days of hesitation SPY followed SPX in triggering the buy signal TrendXplorer issued. The rise occurred on low volume though, well below the 50ma. NDX is the last big index that is still in neutral sell territory and on the verge of having is sell signal too. NDX's rise is on higher volume at around the 50ma, but volume in the QQQ's (chart not shown) was low again.


Superimposed studies for thinkorswim

All charts on this blog are made with the award winning thinkDesktop, the charting software provided by thinkorswim (TOS). thinkDesktop allows users to write private studies such as TrendXplorer in "thinkscript". One of the not so widespread options is to use superimposed studies Stockchart users are familiar with. While some quotes such as $CPC unfortunately are not (yet?) available, most are. And those can be superimposed on any pricecharts, be it ratiowise, standard or inverted.

Want to have VIX inverted on your own TOS pricechart with SPX? 

Want the $DJI priced in "real money" as Bob Prechter likes to say?

Heck, why not price AAPL in terms of orange juice, whatever combination seems sensible? Well, as of today every TOS-er can too.

US Dollar looks fatigued: stocks ready to spurt?

The US Dollar has been rising since Oct, 27. Both on the weekly and the daily chart negative divergence is building up indicating exhaustion and a possible near term reversal. For stocks such an occurrence could be a sign for the start of a new rally triggering in SPY the buy signal TrendXplorer issued the first trading day of 2012. Notice that the both the signals on SPY and SH still await confirmation.
(Dollar charts are shown with closing prices only for better distinction.)




Private domain name for TrendXplorer: www.trendxplorer.info

As of today TrendXplorer is located at: www.trendxplorer.info as its top domain name. Please change your bookmarks. BTW, the "old" address indexswingtrader.blogspot.com stays in use too.


Quiet market, Euro drops

Today it looked almost like the markets took the day off, so there is no reason to say much. Except for the Euro/Dollar, it had to take quite a blow. The USD is hitting overhead resistance and knocking at the door to go up. If the correlation of the last couple of years still holds up, this move in the currencies spells trouble for stocks.


About gallows and positive divergence

For the third time in a row SPX painted a hanging man doji on its chart. On the two prior occasions price was heading due south.
SLV noted a positive divergence with follow through during yesterday and the day before. Today SLV stalled a bit, perhaps taking a pause. TrendXplorer colors still bright red, waiting for the white dot first. So no action is needed yet.


SPX: buysignal triggered

Today last weeks buy signal was triggered. We had a solid price bar above the 200MA. Will it pop and drop, like last July or do we get follow through during the rest of this first week of the new year? We'll have to wait and see. Stops can be set just below the green low of last week.

Follow through or reversal?

Following the fake out in the beginning of July, last week TrendXplorer issued its third buy signal in six months time for SPX. Until now none of those signals actually got triggered, they were reversed instead. Notice how price is hugging the 200MA. Furthermore the DJIA even had seven buy signals, all above the 200MA, but none with any follow through. Will this time be different? We just have to wait and see.