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

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Roy Yorgensen who wrote (3875)4/7/1998 5:56:00 PM
From: TechTrader42  Read Replies (2) 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;
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext