MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 

PopSteckle by David Steckler
In my article in this issue, "Trading Stochastic Pops," I present a technique for identifying
breakouts in stock prices using stochastic pops, whichrefers to a pop, or breakout, in price that leads to a high reading onthe stochastics oscillator.

My stochastic pop technique was introduced to the Market Technicians Association in autumn 1999. One of my MTA colleagues promptly dubbed itthe "PopSteckle." Matt Samojeden, president of the St. Louis Omega UsersGroup, was of invaluable assistance in writing this TradeStation code forthe technique.

The code shown is for a ShowMe study, a TradeStation 2000i feature thatplaces a marker above or below a bar based on a conditional expression.It is common to use ShowMe studies to visually identify key price eventsin preparation for using the idea in a trading system.

A trading system is more than just an entry strategy; it includes bothan exit strategy and a stop-loss strategy as well. Exits may be based onany number of conditions, such as achieving a predetermined profit objective(dollars or percentage), the passing of a defined number of days or weeks,or the crossing of a moving average, and so forth. The choices are almostendless. Likewise, there are any number of different stop-loss strategiesyou may choose to integrate in your system.

The PopSteckle ShowMe study is not in and of itself a backtestable tradingsystem. The study code may be utilized as an entry condition in a tradingsystem that may be backtested. To backtest a system, the trader/investormust select entry, exit and stop-loss strategies.

The code is as follows:


Type : ShowMe , Name : PopSteckle

Inputs:
ADXLev(15),
DStocLev(70),
WStocLev(50),
ADXLen(14),
StocLenD(8),
StocLenW(40),
VolLength(50),
VolFilter(true);
Condition1 = ADX(ADXLen) < ADXLev;
Condition2 = SlowK(StocLenD) > DStocLev and
SlowK(StocLenD) > SlowK(StocLenD)[1];
Condition3 = SlowK(StoclenW) > WstocLev and
SlowK(StoclenW) > SlowK(StoclenW)[3];
{Weekly Data setup}
Condition4 = Volume > 1.5*Average(Volume, VolLength);
{Check for above average volume}
If condition1 and
condition2 and
condition3 and
condition4 and
VolFilter then plot1(High, "Setup");
{Volume Filter is Active with true as the setting}
If condition1 and
condition2 and
condition3 and
condition4 and
VolFilter = False then plot2(High, "Setup");
{Volume Filter is Inactive with false as the setting}

 

t-sm-PopSteckle.gif
The code uses fixed input values to look for a 14-day ADX below 15, aneight-day daily slow stochastic %K above 70, an eight-week (40-day) weeklyslow stochastic %K above 50, and volume greater than 1.5 times the 50-dayaverage daily volume. EasyLanguage allows the substitution of variableinputs in key indicator lookback settings in place of fixed input valuesto allow optimization of the settings for backtesting purposes. I encouragethe reader to experiment with variable inputs.

Entry setup condition 3 at the beginning of my article explained thatthe daily stochastic must be above 70 and rising. ShowMe Condition2 isthat today's daily stochastic value must be greater than 70 and greaterthan yesterday's stochastic value.

ShowMe Condition3 requires explanation. A weekly chart plotting end-ofweek bars ordinarily shows the weekly range, open, and close ending ona Friday. When using a real-time datafeed, TradeStation 2000i plots thelatest bar on a tick-by-tick basis even if today isn't Friday. All previousweekly bars are plotted on a Friday close only, but the latest bar willbe plotted regardless of the day of the week. On a Wednesday, for example,the weekly bar will be plotting and the end-of-day weekly stochastic valuemight be 55. Assuming the other entry setup conditions are met, that mightbe sufficient to trigger an entry signal.

If the PopSteckle code had used weekly bars to evaluate the weekly slowstochastic, historical ShowMe or trade system calculations would not showany signals for Monday through Thursday. ShowMe alerts or trades wouldonly show on Friday if all the entry conditions were met. This code attemptsto compensate for this limitation by equating one week with five days,hence the use of a 40-day stochastic as a substitute for the eight-weekstochastic (StocLenW(40)).

Entry setup condition 4 requires the weekly stochastic value to be greaterthan 50 and rising. ShowMe Condition3 requires that today's "weekly" stochasticvalue be greater than 50 and greater than the stochastic value three daysago.

Why three days? Chartists use longer time intervals to reduce the noiseinherent in shorter time intervals. Weekly charts will not reveal dailyprice fluctuations intraweek. This three-day comparison period is intendedto minimize the noise of the daily stochastic; my experience using thePopSteckle technique is that if today's stochastic value is greater thanthe value of three days ago, then today's weekly stochastic is rising.I encourage the reader to experiment with other time intervals.

As part of testing this code, I compared an eight-week stochastic witha 40-day stochastic on numerous charts. While not identical, values betweenthe two were very close.

ShowMe Condition4 requires that volume be much higher than the averagedaily volume. Heavy volume frequently accompanies a stock breaking outof a congestion range that continues higher in price over the followingdays or weeks. The volume condition may be turned on or off, at the reader'schoosing.

-- David Steckler

Source / From: TOP
http://www.traders.com

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!