SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: Gary Lyben who wrote (6127)8/24/1998 8:16:00 PM
From: Craig DeHaan  Read Replies (1) | Respond to of 11149
 
Gary,

In StochRSI(13) the 13 period smoothing is silently abbreviated, but there nonetheless.

EG.
StocRSI(13):=
Mov((RSI(13)-LLV(RSI(13),13))/(HHV(RSI(13),13)-LLV(RSI(13),13)),13,W)*100

As for smoothing, its mostly a personal preference issue whether E and W. Andy, being an E-coaster likes W, I recall. West of the rockies we prefer E. What's a s.w. developer to do? (...include both).

Craig



To: Gary Lyben who wrote (6127)8/24/1998 9:18:00 PM
From: TechTrader42  Respond to of 11149
 
It appears to be the stochastics applied to an 8 period rsi array
using a 5 period weighted moving average to smooth the %k.


Gary: Some use a weighted MA in the smoothing, and others an
exponential MA.

Here are three StochRSI scans that give values equal to those in
Metastock -- two with the weighted MA, and the other with the
exponential MA.

//StochRSI(8,5), using weighted MA, by Andy Gabor

output = "srsi85ag.lst";
input ="portfoli.lst";

Daystoload = 250;

float StochRSI,PrevStochRSI;
set rsi=8;

StochRSI:=((rsi(0)-min(0,-7,rsi))/(.000001+max(0,-7,rsi)-min(0,-7,rsi))*(33.3333))+
((rsi(-1)-min(-1,-8,rsi))/(.000001+max(-1,-8,rsi)-min(-1,-8,rsi))*26.6666)+
((rsi(-2)-min(-2,-9,rsi))/(.000001+max(-2,-9,rsi)-min(-2,-9,rsi))*20.0000)+
((rsi(-3)-min(-3,-10,rsi))/(.000001+max(-3,-10,rsi)-min(-3,-10,rsi))*13.3333)+
((rsi(-4)-min(-4,-11,rsi))/(.000001+max(-4,-11,rsi)-min(-4,-11,rsi))*6.6666);

PrevStochRSI:=((rsi(-1)-min(-1,-8,rsi))/(.000001+max(-1,-8,rsi)-min(-1,-8,rsi))*33.3333)+
((rsi(-2)-min(-2,-9,rsi))/(.000001+max(-2,-9,rsi)-min(-2,-9,rsi))*26.6666)+
((rsi(-3)-min(-3,-10,rsi))/(.000001+max(-3,-10,rsi)-min(-3,-10,rsi))*20.0000)+
((rsi(-4)-min(-4,-11,rsi))/(.000001+max(-4,-11,rsi)-min(-4,-11,rsi))*13.3333)+
((rsi(-5)-min(-5,-12,rsi))/(.000001+max(-5,-12,rsi)-min(-5,-12,rsi))*6.6666);

//If StochRSI > 20 and PrevStochRSI <= 20 then
Println Symbol,",", "Close: ", Close(0):6:3,", ", "StochRSI: ", StochRSI:6:2,", ",
"Prev. SRSI: ", PrevStochRSI:6:2,", ", "Avgvol: ", avgvol(0,-54):8:0,", ",
"QRS: ", qrs(0),", ", "Rev. Growth: ", rev1growth;
//endif;

********************************

//StochRSI (Variable with WMA), by Brooke

output="srsivar.lst";
input="portfoli.lst";

daystoload= 250;

integer i, j;
float weight, maperiod1, maperiod2, total, totaldays,
StochRSI,PrvStRSI, PrvPrvSRSI, //These are for first StochRSI
StochRSI2, PrvStRSI2, PrvPrvSRSI2, //These are for second StochRSI
maperiod1a, maperiod2a, weighta, totala, totaldaysa;

//SET MA'S FOR FIRST STOCHRSI
maperiod1:=8; //set MA: e.g., in StochRSI(8,5), set for 8; in StochRSI(10), set for 10
maperiod2:=5;// set MA: e.g., in StochRSI(8,5), set for 5; in StochRSI(10), set for 10

set rsi = maperiod1;

//SET MA'S FOR SECOND STOCHRSI -- Second RSI is automatically set below when you set periods
maperiod1a:=10; //set MA: e.g., in StochRSI(8,5), set for 8; in StochRSI(10), set for 10
maperiod2a:=10;// set MA: e.g., in StochRSI(8,5), set for 5; in StochRSI(10), set for 10

weight:=0;
total:=0;
for i = maperiod2 to 1 step -1 do
total:= total + i;
next i;
totaldays:=total;

StochRSI:=0;
PrvStRSI:=0;
PrvPrvSRSI:=0;
for j = maperiod2 to 1 step -1 do
weight:=((j/totaldays)*100);
StochRSI:=StochRSI+((rsi(j-maperiod2)-min(j-maperiod2,(j-maperiod2)-(maperiod1-1),rsi))/
(.000001+max(j-maperiod2,(j-maperiod2)-(maperiod1-1),rsi)-min(j-maperiod2,(j-maperiod2)
-(maperiod1-1),rsi))*(weight));
PrvStRSI:=PrvStRSI+((rsi(j-(maperiod2+1))-min(j-(maperiod2+1),(j-maperiod2)-(maperiod1),rsi))/
(.000001+max(j-(maperiod2+1),(j-maperiod2)-(maperiod1),rsi)-min(j-(maperiod2+1),(j-maperiod2)
-(maperiod1),rsi))*(weight));
PrvPrvSRSI:=PrvPrvSRSI+((rsi(j-(maperiod2+2))-min(j-(maperiod2+2),(j-maperiod2)-(maperiod1+1),rsi))/
(.000001+max(j-(maperiod2+2),(j-maperiod2)-(maperiod1+1),rsi)-min(j-(maperiod2+2),(j-maperiod2)
-(maperiod1+1),rsi))*(weight));
next j;

println symbol, " StochRSI ", maperiod1:2, ": ", StochRSI:6:2, ", ", "PrvStRSI: ", PrvStRSI:6:2,
", ", "PrvPrvSRSI: ", PrvprvSRSI:6:2, ", ", "RSI: ", rsi(0);

set rsi = maperiod1a;

weighta:=0;
totala:=0;
for i = maperiod2a to 1 step -1 do
totala:= totala + i;
next i;
totaldaysa:=totala;

StochRSI2:=0;
PrvStRSI2:=0;
PrvPrvSRSI2:=0;
for j = maperiod2a to 1 step -1 do
weighta:=((j/totaldaysa)*100);
StochRSI2:=StochRSI2+((rsi(j-maperiod2a)-min(j-maperiod2a,(j-maperiod2a)-(maperiod1a-1),rsi))/
(.000001+max(j-maperiod2a,(j-maperiod2a)-(maperiod1a-1),rsi)-min(j-maperiod2a,(j-maperiod2a)
-(maperiod1a-1),rsi))*(weighta));
PrvStRSI2:=PrvStRSI2+((rsi(j-(maperiod2a+1))-min(j-(maperiod2a+1),
(j-maperiod2a)-(maperiod1a),rsi))/
(.000001+max(j-(maperiod2a+1),(j-maperiod2a)-(maperiod1a),rsi)-min(j-(maperiod2a+1),
(j-maperiod2a)-(maperiod1a),rsi))*(weighta));
PrvPrvSRSI2:=PrvPrvSRSI2+((rsi(j-(maperiod2a+2))-min(j-(maperiod2a+2),
(j-maperiod2a)-(maperiod1a+1),rsi))/
(.000001+max(j-(maperiod2a+2),(j-maperiod2a)-(maperiod1a+1),rsi)-min(j-(maperiod2a+2),
(j-maperiod2a)-(maperiod1a+1),rsi))*(weighta));
next j;

println symbol, "StochRSI2 ", maperiod1a:2, ": ", StochRSI2:6:2, ", ", "PrvStRSI2: ", PrvStRSI2:6:2,
", ", "PrvPrvSRSI2: ", PrvprvSRSI2:6:2, ", ", "RSI: ", rsi(0);

*****************************

//StochRSI with EMA, by David Smilay
output="SRSI-EMA.lst";
input="portfoli.lst";
Daystoload= 416;
issuetype=common;
exchange nyse,nasdaq,amex;

float prevEMA, EMA, pct1, pct2, maperiod1, SRSI, StochRSI, PrevStochRSI;
integer i;

maperiod1 := 14; // Exponential Moving Avg periods
pct1 := 2/(maperiod1 + 1); //calculate EMA percentage for current data
pct2 := 1 - pct1; //calculate EMA percentage for previous EMA data

Set RSI=maperiod1;

prevEMA := RSI(-(maperiod1*2)); //RSI seeds prevEMA.
//Recommend 2 to 4. 4 gives most accurate results but slows scan

for i=(maperiod1*2)-1 to 0 step -1 do

SRSI :=(RSI(-i)-Min(-i,-i-maPeriod1+1,RSI))/
(.00001+(Max(-i,-i-maPeriod1+1,RSI)-Min(-i,-i-maPeriod1+1,RSI)))*100;
EMA := (pct1 * SRSI) + (prevEMA * pct2);
if !i = 0 then
prevEMA := (pct1 * SRSI) + (prevEMA * pct2);
endif;

next i;

StochRSI := EMA;
PrevStochRSI := prevEMA;

println symbol, ",",StochRSI:5:3,", ", PrevStochRSI:5:3;



To: Gary Lyben who wrote (6127)8/24/1998 10:56:00 PM
From: Jan Robert Wolansky  Respond to of 11149
 
Gary, here are the formulas I use for StochRSI(34/13), StochRSI(13) and StochRSI(8/5) in Metastock:

Mov((RSI(34)-LLV(RSI(34),34))/(.0000001+(HHV(RSI(34),34)-(LLV(RSI(34),34)))),13,E)*100

Mov((RSI(13)-LLV(RSI(13),13))/(.000001+(HHV(RSI(13),13)-(LLV(RSI(13),13)))),13,E)*100

Mov((RSI(8)-LLV(RSI(8),8))/(.00001+(HHV(RSI(8),8)-(LLV(RSI(8),8)))),5,E)*100

As the numerous messages from others indicate, we'd like flexibility in setting the time periods and the type of moving average applied.

Thanks!

Jan



To: Gary Lyben who wrote (6127)8/24/1998 11:32:00 PM
From: bdog  Respond to of 11149
 
Hi Gary, "with a fast stochastic i.e. no smoothing?

I might as well add 2 cents here, but I have a question for all the smart guys... I consider the standard stochrsi 13/13 a fast stochastic
ie 1 period internal smoothing...yes/no?

the second indicator allows for slower stoch

here's my stochrsi soup...

stochrsi:

mp1:=Input("RSI Periods",1,377,13);
mp2:=Input("EMA Periods",1,377,13);

Mov((RSI(mp1)-LLV(RSI(mp1),mp1))/
(.0000001+(HHV(RSI(mp1),mp1)-(LLV(RSI(mp1),mp1)))),mp2,E)*100

with slowing:

mp1:=Input("RSI Periods",1,377,13);
mp2:=Input("EMA Periods",1,377,13);
mp3:=Input("Slowing Periods",1,377,13);

Mov(Sum((RSI(mp1)-LLV(RSI(mp1),mp1)),mp3)/
Sum((.0000001+(HHV(RSI(mp1),mp1)-(LLV(RSI(mp1),mp1)))),mp3),mp2,E)*100

bdog



To: Gary Lyben who wrote (6127)8/25/1998 9:11:00 PM
From: Bob Jagow  Respond to of 11149
 
Gary,
Would be nice if the upgrade labeled the indicator window with the the current Screen Layout parameters. We often set them differently in the 9 screens, and there is no indication of what they are except via indicator/options.

As entered in Set would be fine -- MACD 8,17,9

Bob



To: Gary Lyben who wrote (6127)8/26/1998 12:16:00 AM
From: gonzongo  Read Replies (1) | Respond to of 11149
 
Gary- my 2 cents here:
StochRSI is simply the stochastic formula on RSI rather than price.
Although I prefer weighted - Simplicity is more important for in the end- a buy is a buy is a buy.

I believe most stochastics formulas use exponential smoothing as a default. If so- stochastic of any token close, high, volume, dmi, rsi etc. would or should be :
Mov((token(%K days)-LLV(token(%k days),%k smoothing)/(HHV(token(%k days),%k smoothing)-(LLV(token(% k days),%k smoothing))),%D days,e)*100
Thus stochRSI 14 is really stochastic(14,14,14) of RSI rather than price.

StochRSI (8,5) is really stochastic(8,8,5) of RSI rather than price.

Folks please correct me if I am wrong.

I personally would be happy with exponential is that indeed is the default used in all software on stochastics.

g



To: Gary Lyben who wrote (6127)8/26/1998 12:59:00 PM
From: Gary Lyben  Read Replies (9) | Respond to of 11149
 
All -

There is a new qp2 update on the web. You can use either www.qp2.com or www.qp2b.com The sites are mirror images.

With this update, you can set both sites in the qp setup program as hosts, and the downloader will go to the backup site if it can't download from the primary.

www.qp2b.com is hosted in southern California, while www.qp2.com is hosted in Atlanta.

Some of you may get better performance from one or the other. Both sites have multiple T3's or OC12 connections to the internet. So far both seem pretty fast and reliable.

Gary

August 25,1998 release notes

Added CCI indicator to both the chart and scan programs.

For the scan language, the syntax is:

CCI(Daynum) -

This function return the value of the cci indicator for the specified day.

Set CCI = P;

The CCI periods can be set using this statement.

Added a parameter on the Internet tab in qp setup to use the default Internet Explorer options. This allows use of the proxy settings in Internet Explorer.

Fixed a problem with system gpf's when a large number of Metastock files were being created.

Fixed a problem in the scan where variables would not initialize correctly - this resulted in the scan giving erroneous error messages.

Added multiple host support in the internet downloader. This will allow users to automatically download from a backup site if they can't get to the primary site.

Fixed miscellaneous gpf's in the chart program.

Fixed the import scan function to show the imported scan in the scan dialog box .



To: Gary Lyben who wrote (6127)8/27/1998 9:01:00 AM
From: Jurgen  Read Replies (1) | Respond to of 11149
 
Gary, some data errors causing problems (for me):

1. Pier I (PIR) split 7/30/98, not adjusted
2. !CRB something's wrong 8/11/98

thx
Jurgen