This is a scan for the 21-day MA of Dahl(50) crossing 0. It's the same as the first scan I posted (the one I mistakenly called Dahl crossing 50), but I've changed the names of some variables in it, so nothing gets confused with the variables in the simpler Dahl scan. That's it for Dahl scans.
//DahlMA crossing 0 by Brooke Elise Nagler
output="dahlma.lst"; //input="ibd.lst";
float a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, nn, oo, pp, qq, rr, aaa, bbb, dahlma, prevdahlma;
a := movavg(0,50,cl) ; b := movavg(-15,50,cl) ; c := movavg(-1,50,cl) ; d := movavg(-16,50,cl) ; e := movavg(-2,50,cl) ; f := movavg(-17,50,cl); g := movavg(-3,50,cl); h := movavg(-18,50,cl); i := movavg(-4,50,cl); j := movavg(-19,50,cl); k := movavg(-5,50,cl); l := movavg(-20,50,cl); m := movavg(-6,50,cl); n := movavg(-21,50,cl); o := movavg(-7,50,cl); p := movavg(-22,50,cl); q := movavg(-8,50,cl); r := movavg(-23,50,cl); s := movavg(-9,50,cl); t := movavg(-24,50,cl); u := movavg(-10,50,cl); v := movavg(-25,50,cl); w := movavg(-11,50,cl); x := movavg(-26,50,cl); y := movavg(-12,50,cl); z := movavg(-27,50,cl); aa := movavg(-13,50,cl); bb := movavg(-28,50,cl); cc := movavg(-14,50,cl); dd := movavg(-29,50,cl); ee := movavg(-15,50,cl); ff := movavg(-30,50,cl); gg := movavg(-16,50,cl); hh := movavg(-31,50,cl); ii := movavg(-17,50,cl); jj := movavg(-32,50,cl); kk := movavg(-18,50,cl); ll := movavg(-33,50,cl); mm := movavg(-19,50,cl); nn := movavg(-34,50,cl); oo := movavg(-20,50,cl); pp := movavg(-35,50,cl); qq := movavg(-21,50,cl); rr := movavg(-36,50,cl);
aaa := (a-b)+(c-d)+(e-f)+(g-h)+(i-j)+(k-l)+(m-n)+(o-p)+(q-r)+(s-t)+(u-v)+(w-x)+(y-z)+(aa-bb)+(cc-dd)+(ee-ff)+(gg-hh)+(ii-jj)+(kk-ll)+(mm-nn)+(oo-pp); bbb := (c-d)+(e-f)+(g-h)+(i-j)+(k-l)+(m-n)+(o-p)+(q-r)+(s-t)+(u-v)+(w-x)+(y-z)+(aa-bb)+(cc-dd)+(ee-ff)+(gg-hh)+(ii-jj)+(kk-ll)+(mm-nn)+(oo-pp)+(qq-rr); dahlma := (aaa/21); prevdahlma := (bbb/21);
if dahlma>0 and prevdahlma<0 then println Symbol , "," , " dahlma:", dahlma , "," ," Close:", Close(0) , "," , " Vol:", vol(0) , " , " , " PE:", PE , " , " , " QRS:", QRS(0) , "," , " Sharesfloat:", Sharesfloat , "," , description; endif; //println symbol,", ",description,", ",close(0),"," dahl; //endif; |