Quantcast
Channel: TrendXplorer
Viewing all 70 articles
Browse latest View live

State of the Markets

$
0
0
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.


The picture for the Russell2000 is not very different from SPX, though the small caps show some lagging performance in attacking its July and May 2011 tops.

Banks did follow the rise in the broader indices too, but some heavy distribution seemed to be going on last week, followed by a drop the the daily 200 SMA which acted as support with price bouncing up on Friday.

After making a new all time high on the first trading day of 2012 consumer staples did make a double top during Januari 2012. It happened on waning momentum and with some firm negative divergence with the May 2011 top. Last week consumer discretionary (XLY) followed suit in setting its all time high on last Thursday (chart not shown).

Treasury Bonds as reflected in TLT went sideways for weeks on stretch, finding support on the daily 50 SMA. During the week before last, price crossed below resulting in a sell signal on Monday last. The sell did not trigger though (extreme point = low did not break) and was canceled on Friday.

This week GLD went ballistic by jumping of its 200 daily SMA. TrendXplorer still has GLD on neutral, as it should to prevent whipsawing. The build in inertia works just like a flywheel.
Notice the cross of the weekly 30 SMA (150 daily SMA) on GLD that supported the uptrend since January 2009.

With the anticipated upmove in SLV by the positive divergence that confirmed in the first weeks of 2012, the sell signal went off, allowing to jump on the SilverExpress. As SLV is spurting towards its 200 daily SMA, momentum is still supportive for the upmove.

After making a higher on double negative divergence, the US Dollar (UUP) is dropping like a brick, cutting through its averages like a razor blade. No signs of nearby support. Of course its mirror, FXE, is racing for the surface like a radio buoy released from a submarine (chart not shown).

To conclude this market update a look at oil. USO closed the week right on the daily 50 SMA. TrendXplorer is neutral on oil. But with the falling dollar, one is tempted to think oil going to new highs.

Have a great trading week!

Summation Indexes are rolling over

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

thinkscript code for McClellan Summation Index and Histogram

$
0
0
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.

The study on the price chart is a modification of the standard TOS study and prints the Summation Index in white bullets along two simple moving averages, with a length of 5 (green) and 10 (red) respectively. See legend on the chart too. Be sure to hit the tickbox next to show "On upper paragraph".


The lower pane holds the histogram of the Summation Index with the two moving averages. The histogram is positive as long as the Summation Index is above the 10 period MA. A waning downtrend renders the histogram to dark red and a waning uptrend renders the histogram to dark green.

Notice both the Summation Index as well as the histogram can offer divergence signals to price.

The thinkscript code is provided in the comment section for copy/paste.

Enjoy!

PPO ROC'n Roll

$
0
0
[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!

The histogram does not only show that PPO is rising or declining, it also reveals acceleration or deceleration of the up- or down movement. Even with slower settings like the ones used in the chart above (55,144,34) bottoms and tops are marked accurately. Divergence can be detected long before PPO does.

In acknowledgment to the Wall Street saying : "market tops are a process, bottoms are an event", it's perhaps best to ride uptrends until PPO turns down, signaled by a colorshift from green to red in the histogram, thus negating shifts from green to dark green. As downtrends often move faster, the deceleration warning from the histogram (colorshift from red to dark red) could be an exit signal. In case of a confirmed divergence a more aggressive play could be: exit short and enter long.
NB! As always: do your own diligence and have fun ROC'n rolling with PPO!

Bonus:
The thinkScript code is enclosed in the comment section.
Copy/Paste as New study in TOS or drop me a line and I'll send the .ts study for direct import in return.
Be sure to select ROC as HistoType/ColorType and adjust settings to what suits you.

Feedback on indicator settings is most welcome!

Stocks about to hit bottom?

$
0
0
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.

BTW, don't miss the newly decorated Chartroom with 4 indicators that measure market internals.

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

$
0
0
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:

The arrows on the SPX-price chart mark the instances where the indicator is below -2 and has turned up again. To my opinion we see way to many signals in a downtrend, while in an uptrend bottoms are marked as frequently as they are signaled too soon. The same behavior of this indicator occurs during 2000 - 2007 (chart not shown). How about a 10-period ROC% then?
Way less signals, most bottoms are signaled at their mark or vicinity. And the "noise" during downtrends is reduced considerably. But does it outperform SPX's own ROC%-signals?
I guess the jury is still out on this one. Anyone interested in tweaking HIO's ROC% settings can download the thinkscript code posted below in the comment section.

Second: MHCAX's 19-week EMA as a liquidity indicator
Use the weekly of the NAV of MHCAX, a mutual fund, as a proxy for liquidity. Every time the price goes below the 19-week EMA, it indicates liquidity problems and a bear market. Returning above that EMA signals the return of a bull market.
The (daily!) price chart depicts MHCAX and its 95-period EMA with SPX superimposed. The indicator pane shows the LiquidityMeter, which basically is a colored PPO(1,95,1) of MHCAX. Green: liquidity waxes, stocks go up. Red: liquidity wanes, stocks go down.
Jury says: guilty as charged. See the comment section for thinkscript code.

Extra: HIO:TLT as a risk ON:OFF meter
Derived from Terry Laundry's FAGIX:VUSTX complacency indicator. Whenever the ratio is above its 89-day SMA, risk is in vogue: a bullmarket. A ratio below the SMA indicates people are adopting an aversion for risk.
The composition of the RiskOmeter is similar to the LiquidityMeter: a colored PPO(1,89,1) of the HIO:TLT ratio. As proposed by Laundry a SMA is used instead of the EMA. The RiskOmeter seems to be quite a nice trend monitor. Notice the difference in behavior in downtrends against uptrends: in a bearmarket the maximum deviation is reached near the end of the trend while in a bull market the deviation maximum is registered quite soon after the trend reversal. To me there is not that much difference between these last to indicators. And again: the thinkscript code is in the comment section.

So feel free to download the indicators and do some tinkering. Enjoy!

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

$
0
0
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)


JK Fast Line measures the most immediate, near-term progression of a market's trend and smallest degree of the Elliott wave structure.
JK Base Line measures the intermediate progression of a market's trend.
JK Slow Line (not show on screen shot) measures the long-term progression of a market's trend.
In the original JK_TA each panel of the indicator consists of three lines: a 5-period %R, a 10-period %R and a 15-period %R of the line concerned.
A reading of 100 indicates an uptrend. A reading of 0 indicates a downtrend.

The JK TA as such is as a proxy for clarifying the underlying Elliott wave structure: 
When all three lines in any version are flatlining (blended into one), it signals an impulsive, or motive, structure. See the blue lines in screen shot.
On the other hand, anytime you see the three lines separate, it's a strong signal that the market is yielding a countertrend, or corrective pattern.

The JK_TA can be used on any instrument and on any time frame:

The first, second and third chart depict the basic indicator for different time frames. The fourth chart shows a custom variant of JK_TA: the Fast, Base and Slow lines packed together in one panel,  selectable by the 5%R, 10%R or 15%R version of the three indicators.

Anyone needing help in counting waves can download the thinkscript studies from the comment section. While the default settings are 5 and 20, these may be adjusted to ones preferences.
Ready? Start counting!

ElliottWaveOscillator revisited

$
0
0
[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.



I made a couple of adjustments to the original indicator provided by TOS:
- percentage difference instead of the standard nominal result (for better historical comparison on long term analysis).
- user definable coloring to the standard settings (sma5 - sma35).
- a 5-period sma smoothed ROC version with coloring (based on the somewhat slower difference between a 10-period sma and a 70-period sma (twice the standard values).
- pricebar coloring (separate thinkscript).

The ElliottWaveOscillator works on every timeframe as it does for every instrument.


Set your coloring to your personal preferences and trading style. For the thinkscipt code see the comment section.

Trade safe!

[UPDATE] EWACS - Elliott WAve Count Support
The combination of the ElliottWaveOscillator and the JK_TA trend or wave analyzer in one package.
BTW, I omitted two small red dots, the smallest ones actually. Any idea where they should have been painted?

Please notice: Choose a setting for the alignment factor (default = 100) at which the histogram oscillates nicely between the top and bottom readings of the trend analyzer. Settings will depend from instrument to instrument and the timeframe of the pricechart.

For JK_TA explanation, see here.


Followup ElliottWaveOscillator: Breakout Bands added

$
0
0
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.


The updated thinkscript code is in the comment section for copy/paste into TOS as New Study.

Fibonacci Rainbows

$
0
0
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!


[EDIT] For anyone interested in important Fibonacci levels the article on Safehaven is a must read!

Look for the Rainbow thinkscript studies code in the comment section below.

Sigma Band Break System

$
0
0
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.

Basically the Sigma Band Break System uses multiple Bollinger Bands set at 0.5 / 1 / 1.5 / 2 standard deviation above and below the midline. When a pricebar closes above the +0.5 band, the beginning of an uptrend is assumed, while a bar with a closing price below the -0.5 band indicates the start of a downtrend. Both bands can also be useful for determining stop loss or exit levels.

[Update:] The Sigma Band Break System works on any timeframe (see examples below), but, like most mechanical trading systems, it does suffer from whipsawing in non-trending periods. To help prevent whipsaws and reduce the number of signals one acts upon, consider the "extreme point rule". This simple rule requires a trader to mark the extreme price point for the day/bar on which his indicator(s) fires a buy/sell signal. The extreme point is highest of point of a session c.q. the lowest point of the session. Buy or sell signals are triggered when prices move beyond the extreme point. Use the Signals script for plotting the "ExtremePoints".


The three thinkscript studies for the bands, the bar coloring and the up/down arrows along with ExtremePoints are posted in the comment section.

Enjoy the scripts and trade with caution!

Hurst Channels and Oscillator

$
0
0
[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.”


The Hurst Channels and the Hurst Oscillator, be it combined or separate, can be implemented to uncover turning points in all time frames. Notice that the Hurst Oscillator is basically just another presentation of the position of price in the Hurst Channel.
Double Hurst Channels give an even better idea on the direction of price. To create a double Hurst Channel, simply load the indicator twice and lower the settings for the inner channel.

Be advised though, as the centered moving average is extrapolated into the ‘future’ by half of its length, the actual direction of the channel is based on the assumption the most recent trend will continue in a straight line. For a more sophisticated channel prediction polynomial regression formulas are necessary (please share if you have them available for thinkscript!).

The percentage settings for the channels my have to be adjusted depending on the instument and the selected time frame! See for examples the charts below.




These indicators were brought to my attention by 40+ years veteran trader S.K. Yarbrough (see markethighsandlows.wordpress.com). In case you stop by, be sure to check his tutorial too. Scotty (no affiliation!) also offers a paid service for members with a limited time special subscription rate of just $5.00 for the first month.

My compliments go to Rich Houser and Kirill Kirillov of the TOS_thinkscript group for providing the core CMA-code.

The [updated] thinkscript code for both studies is available in the comment section for copy/paste as "New Study" or hit download below.


Hurst_ChannelsSTUDY.ts

<------->

Hurst_OscillatorSTUDY.ts



[Depending on your configuration the STUDY.ts files may be recognized by your computer as video files. Be assured, they are not. The files are "just" plain text files with the extension .ts because that's the kind of files thinkDesktop can import.]

Leave of absence: expired

Improved FlowPrice for Hurst Oscillator

$
0
0
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.


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

$
0
0
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).


Alert notifications may also be received by Email or SMS. Go to thinkDesktop's setup menu to adjust your notifications settings.


The thinkscript code for the studies is available in the comment section for copy/paste.
 

Thrill Rides by PayPal

$
0
0
[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.]

Long Term Trading System (aka IRA System)

$
0
0
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:

As always the thinkscript code for the chart study and the lower pane indicator are available in the comment section for copy/paste into TOS. For free of course ;)

Providing a statistical framework for DMI, MACD and RSI

$
0
0
After 16,000+ page views in the last year, I'd like to take advantage of this opportunity to thank all of my visitors and followers for their continued interest and support. And while today is the Twelfth Night or Epiphany it's also just in time for wishing everyone a profitable, prosperous and healthy New Year.

Now over to the subject of this posting. In 2010 a former software engineer at Intel Corporation by the name of Michael Gutmann published an article on "A Statistical Approach to Technical Indicators". Gutmann also wrote a book titled "The Very Latest E-Mini Trading: Using Market Anticipation to Trade Electronic Futures."

In his article Gutmann illustrates a method of converting technical indicator outputs from asset-specific values to statistical measures of price extension and compression. He stated that the results of such indicators can be used across markets without modification.

Gutmann explains that standard deviation is the most common method of estimating the spread, or dispersion, of a data set:
The data’s mean, or average, referred to with the Greek letter μ (“mu”), is first calculated. The data’s standard deviation is then calculated as the average distance of the data set from its mean. The standard deviation, referred to with the Greek letter σ (“sigma”), is easy to work with because it takes values that are the same units as the original, underlying data.
The science of statistics has determined that for many naturally occurring populations (population height, weight, test score, etc.), data is “normally” distributed about its mean. This is the well-known bell curve of population distribution. Interestingly, bell curves are completely defined by their mean and standard deviation. This allows one to say that a normal distribution has approximately 70% of its data contained with one standard deviation of its mean and 95% within two standard deviations, regardless of the values computed for the data’s mean and standard deviation.
 

Based on the work of Gutmann it is possible to rebuild well known technical indicators like DMI, MACD and RSI to their so-called z-scored versions. Gutmann elaborated this concept as follows:

Making use of standard deviation with market price and, in particular, bar charts, is straightforward. The standard deviation of recent price history is first calculated using some number of previous bar prices. Picking a history length is similar to selecting the length for a moving average indicator. Then a standard deviation relative position of recent price can be determined. Specifically, the current price, x, is said to be at “(x – μ)/σ standard deviations”; that is, the current price, x, is some number of standard deviations displaced from the mean.
The value (x – μ)/σ may at first seem obscure. But consider the meaning of any fraction or ratio, for example, the fraction one-third. An interpretation of the fraction is, How many 3s are there in 1? In the same way, the ratio (x – μ)/σ asks, How many standard deviations are there in x – μ, the distance of the current price from market mean price? The technical term for the ratio (x – μ)/σ is “z-score.” By converting indicator output values to z-scores we are able to move technical indicators to a statistical basis.



As an example let's take a look at the z-scored MACD or MACD_Z. All three components are painted in units of their respective standard deviation. Bearing the statistical concept of "normal distribution" in mind one is capable of a making a probabilistic statement on the direction of the indicator and thus of the instrument it is measuring. When MACD_Z is i.e. at or near the -3 standard deviation line, there is a 99.7% change MACD_Z will snap back (if only for some time). Next to exposing prices extremes z-scored indicators also have this ability to confirm a continuation pattern. Notice how MACD_Z finds itself on more than a few occasions confined between +/- 1 or 2 standard deviations, by repetition the standard deviation seems to repel the indicator curve. The last feature I'd like to mention is showing divergences.

In his conclusion Gutmann states:
Moving technical indicators to a statistically valued format retains the properties of the original indicator while making the new statistical indicators robust and portable. The statistical indicator often eliminates the need for time-consuming and error-prone modifications. This sort of simple statistical technique isn’t rocket science but it is very useful.

Finally I'll only demonstrate charts with the other two z-scored indicators DMI_Z and RSI_Z, because the concept stays the same.


The thinkscript study codes are available in the comment section below this posting. Please take a look at the study headers where credit is given to Louis Sparks, whose script of his standardized MACD version was shared in the Yahoo thinkscript group. The other z-scored studies are derived from Louis' version.  Enjoy!

Sigma levels for identifying bullish and bearish mode with z-scored momentum oscillators like RSI or TSI

$
0
0
As a sequel to my post of last Sunday about a statistical framework for technical indicators, this post is about a technique how momentum indicators help to identify a bull or a bear market. For this technique we'll assume that a momentum indicator can sustain a bullish or bearish mode for a prolonged time. This behavior was introduced to me by Zev Spiro CMT in his daily market letters. Zev distinguishes a bullish mode when the RSI breaks above the bearish resistance level of 65. When in bullish mode the 40 level acts as bullish support. So during a bull market the RSI may fall down to this 40 level as long as it doesn't cross below this level. When RSI breaks below the bullish support level of 40 a change of trend is assumed and RSI has shifted into it's bearish mode.

See the chart below for an example on a long term weekly chart of SPX. Instead of the usual RSI the z-scored version is used and please note the support and resistance sigma levels are manually calibrated, unlike Zev's fixed levels.


Notice how in a bullish trend the RSI_Z is rejected by the red support line, while in a bearish trend the green line takes over this quality, but as resistance. So in a bullish trend the ricochet on the red line presents a buying opportunity and the touch without a cross of the green line is a chance to add shorts. A change of trend is indicated by a break of the trend lines.

The same behavior is noticeable with another momentum oscillator, the True Strength Index or TSI. John Townsend aka theTSItrader has dedicated his blog to this technical instrument along with it's application on gold related stocks. Be sure to check out his blog, especially both his postings on various techniques for using the TSI. On the chart below however not the standard TSI is applied, but it's statistical normalized version: TSI_Z with John's favorite fast settings (4,7). Again the sigma levels for support and resistance are manually calibrated by historical comparison.


Next to the buying and selling opportunities offered by the break of the green line (up) or the red line (down), also the second chances for a bite at the cherry are shown (see the blue circles).

The last example is a long term chart of the US$ index with the z-scored TSI (4,7) depicted along with one of the techniques John discovered: the trend line break.


Any comment or suggestion to improve the indicators or their application would be much appreciated!
Please take a look in the comment section below for the thinkscript code for the z-scored TSI.
To conclude two side notes:
- mathematically there is no difference between the TSI settings (4,7) and (7,4).
- new avatar: the golden spiral expresses my preference for Fibonacci numbers
  and it has beautiful colors that match the ones I like to use on my charts.

                 

Guestpost by Lar: KC_PercentK

$
0
0
TrendXplorer has been so generous in sharing his scripts, I thought I would share something in return I have been working on with him recently. It is a trend indicator based upon the Keltner Channel, with a Bollinger PercentB like concept, I have named KC_PercentK. However, it uses a short term (6,0.5) and a long term (20,1.5) PercentK to determine the trend.


It is a lower indicator with Price Bar Coloring options are as follows:
- Bright_Green : Both Short term and Long term trends are Up,
- Bright_Green : Both Short term and Long term trends are Up,
- Bright_Red : Both Short term and Long term trends are Down,
- Light_Red : Short term trend is Down and Long term trend is Up,
- Yellow : If ChopColor is selected yes, then all Price Bars occurring during Choppiness
  periods per the Trend Strength Label (discussed below) will be colored.

During uptrends, light red colors may indicate a pullback if the red cloud on the lower indicator  is  shrinking or above approximately -100 and then green/light_green bar colors continue. Otherwise, a possible trend reversal is indicated. The opposite applies for downtrends.

The lower indicator has cloud colors to indicate short term price action as green/red and long term as dark_green/dark_red.  A red cloud peeking out of the green upper cloud  or a green cloud peeking out of a red lower cloud can be a warning of a possible pullback or change in trend. Aggressive traders may possibly consider this as an early entry/exit signal.

The trend matching the coloring of the price bars is shown as dots on the zero line of the lower indicator. Orange dots shadowing the trend dots indicate a Bollinger Band/Keltner Channel Squeeze (provided by Mobius@MyTrade). An Orange Label indicates the Squeeze status and number of consecutive bars being squeezed. The longer the squeeze is lasting may indicate a larger move when it ends. The direction that price goes once the Squeeze ends is often the color of the Cloud during the Squeeze.

A Trend Strength label (also provided by Mobius@MyTrade) is worded Trending and color coded to be light_green (weak) and green (strong) for uptrends and light_red (weak) and red (strong) for downtrends. It is worded Choppy and color coded light_green/light_red for Choppiness.

As is traditional on TrendXplorer's blog, the thinkscript code is available in the comment section.

[Edited] Finally, when using price colors, another script is very helpful. priceLine plots a line that follows the close(last) price, so you can see where price is within a colored candle. It is also helpful in determining whether a previous candle/level has been breeched. It could be added as part of a thinkscript study, standalone or however one might deem. See the comment section for an example of priceLine as a separate study.
Viewing all 70 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>