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: Bob Jagow who wrote (3061)1/15/1998 1:41:00 AM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
I'm surprised that you say you need to redo the scan. With an 8:4 output, the results are identical to those in WOW, and to those generated by the MSWIN formula. Plot slope in WOW, select the data window under View, and the data line should be over the most recent date. The value is in the data window under slope, of course. Try it again by creating a custom indicator for this formula:

( (14 * (Sum(Cum( 1 ) * C ,14 ) ) ) - (Sum(Cum( 1 ) ,14 ) * (Sum( C ,14) ) ) ) / ( (14 * Sum(Pwr (Cum( 1 ) ,2 ) ,14 ) ) - Pwr(Sum(Cum( 1 ) ,14 ) ,2 ) )

Again, the values are the same. You have to make the output 8:4, though. QP rounds it off if you use 8:2.

Brooke



To: Bob Jagow who wrote (3061)1/15/1998 2:13:00 AM
From: TechTrader42  Read Replies (1) | Respond to of 11149
 
Your formula is completely adaptable for Dahl, too. Below is a QP formula for the 13-day linear regression slope of Dahl. For BNGO, the formula gives a value of -0.0175. That's the same value that WOW gives with this formula: slope(fml("Dahl's primary trend"),13), where Dahl's Primary Trend is: mov(c,50,s) - ref(mov(c,50,s),-15).

Here's the QP formula:

//13-day linear regression slope of Dahl

Output="daslope13.lst";

DaysToLoad=250;

Integer i, S, Sx, Sxx;
Float aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, nn, oo, pp, qq, rr, ss, tt, uu, vv, ww, xx, yy, zz, dahl, dahla, dahlb, dahlc, dahld, dahle, dahlf, dahlg, dahlh, dahli, dahlj, dahlk, dahll, dalslope, Sxy, Sy;

aa := movavg(0,50,cl) ;
bb := movavg(-15,50,cl) ;
cc := movavg(-1,50,cl) ;
dd := movavg(-16,50,cl) ;
ee := movavg(-2,50,cl) ;
ff := movavg(-17,50,cl) ;
gg := movavg(-3,50,cl) ;
hh := movavg(-18,50,cl) ;
ii := movavg(-4,50,cl) ;
jj := movavg(-19,50,cl) ;
kk := movavg(-5,50,cl) ;
ll := movavg(-20,50,cl) ;
mm := movavg(-6,50,cl) ;
nn := movavg(-21,50,cl) ;
oo := movavg(-7,50,cl) ;
pp := movavg(-22,50,cl) ;
qq := movavg(-8,50,cl) ;
rr := movavg(-23,50,cl) ;
ss := movavg(-9,50,cl) ;
tt := movavg(-24,50,cl) ;
uu := movavg(-10,50,cl) ;
vv := movavg(-25,50,cl) ;
ww := movavg(-11,50,cl) ;
xx := movavg(-26,50,cl) ;
yy := movavg(-12,50,cl) ;
zz := movavg(-27,50,cl) ;

dahl := (aa-bb); //dahl(0)
dahla := (cc-dd); //dahl(-1)
dahlb := (ee-ff); //dahl(-2)
dahlc := (gg-hh); //dahl(-3)
dahld := (ii-jj); //dahl(-4)
dahle := (kk-ll); //dahl(-5)
dahlf := (mm-nn); //dahl(-6)
dahlg := (oo-pp); //dahl(-7)
dahlh := (qq-rr); //dahl(-8)
dahli := (ss-tt); //dahl(-9)
dahlj := (uu-vv); //dahl(-10)
dahlk := (ww-xx); //dahl(-11)
dahll := (yy-zz); //dahl(-12)

S := 13;
Sx := 0;
Sxx := 0;
//Sxy := 0;
//Sy := 0;
for i = 1 - S to 0 do
Sx := Sx + i;
Sy := dahl + dahla + dahlb + dahlc + dahld + dahle + dahlf + dahlg + dahlh + dahli +dahlj + dahlk + dahll;
Sxx := Sxx + i*i;
Sxy := (0*dahl)+(-1*dahla)+(-2*dahlb)+(-3*dahlc)+(-4*dahld)+(-5*dahle)+(-6*dahlf)+(-7*dahlg)+(-8*dahlh)+(-9*dahli)+(-10*dahlj)+(-11*dahlk)+(-12*dahll);
next i;
dalslope := (S*Sxy - Sx*Sy)/(S*Sxx - Sx*Sx);

println symbol,",",close(0):8:2,",",dalslope:8:4;

Brooke