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: Roy Yorgensen who wrote (3875)4/7/1998 5:56:00 PM
From: TechTrader42  Read Replies (2) | Respond to of 11149
 
In QP2, you can set the Stochastic MA's like this:

Set Stochastic = 89,21,5;

I did that in this scan:

//Weighted Stochastics, by Jack Landis
//translated to Window on Wall Street by Andy Gabor
//translated to QP by Brooke

output="wstochas.lst";

DaysToLoad=150;

float a, b, c, d, e, wstocha, aa, bb, cc, dd, ee, wstochb;

Set Stochastic = 89,21,5;

a := .43*StochasticPctK(0);

Set Stochastic = 55,13,5;

b := .26*StochasticPctK(0);

Set Stochastic = 34,8,5;

c := .16*StochasticPctK(0);

Set Stochastic = 21,5,5;

d := .10*StochasticPctK(0);

Set Stochastic = 8,3,5;

e := .05*StochasticPctK(0);

wstocha := a+b+c+d+e;

Set Stochastic = 89,21,5; //This is the weighted stochastic total

aa := .43*StochasticPctK(-1);

Set Stochastic = 55,13,5;

bb := .26*StochasticPctK(-1);

Set Stochastic = 34,8,5;

cc := .16*StochasticPctK(-1);

Set Stochastic = 21,5,5;

dd := .10*StochasticPctK(-1);

Set Stochastic = 8,3,5;

ee := .05*StochasticPctK(-1);

wstochb := aa+bb+cc+dd+ee; //this is previous day's weighted stochastic

if wstocha > wstochb and
wstocha > 12 then
println Symbol:-3, ",", "BUY , Close: ":-3,Close(0):7:3,"," , " Weighted stochastic", ",", wstocha:7:3;
endif;

//Alternate buy signal (with "and wstochb<12") -- for fewer signals
//if wstocha > wstochb and
//wstocha > 12 and
//wstochb < 12 then
//println Symbol:-3,",", "BUY , Close: ":-3,Close(0):7:3,"," , " Weighted stochastic", ",", wstocha:7:3;
//endif;

if wstocha < wstochb and
wstocha < 88 and
wstochb > 88 then
println Symbol:-3,",", "SELL , Close: ":-3,Close(0):7:3,"," , " Weighted stochastic", ",", wstocha:7:3;
endif;



To: Roy Yorgensen who wrote (3875)4/7/1998 8:53:00 PM
From: Paul Beattie  Read Replies (1) | Respond to of 11149
 
Roy,

I checked the QP-R1 Help screens, and you can set the %K and %D parameters. (see Changing Indicator Parameters) The R1 scan which I have refers to Stochastic%K(0) and Stochastic%D(0), and I didn't set the MA value. One approach is to calculate an MA the long way in QP-R1.
A:=Fn(0)
B:=Fn(-1)
C:=Fn(-2)
D:=Fn(-3)
MA:=(A+B+C+D)/4

If you want weighted average use:
MA:=(4*A+3*B+2*C+D)/10

Obviously 200dayMA gets tedious!

Good luck,
Paul



To: Roy Yorgensen who wrote (3875)4/11/1998 12:10:00 AM
From: milesofstyles  Respond to of 11149
 
does post 3205 help you at all?