童牧野 鬼变脸指标 简洁源码 cc:=CLOSE;oo:=OPEN; hh:=MAX(cc,oo); ll:=MIN(cc,oo); mm:=0*cc; y:=IF(cc>=oo,0,8); for i=2 to DATACOUNT do begin IF y[i-1]=0 then begin IF cc[i]>=hh[i-1] then begin hh[i]:=cc[i]; ll[i]:=hh[i-1]; mm[i]:=ll[i]; k[i]:=1; y[i]:=0; end;else IF cc[i]<hh[i-1] and cc[i]>=mm[i-1] then begin hh[i]:=hh[i-1]; ll[i]:=cc[i]; mm[i]:=ll[i]; k[i]:=2; y[i]:=0; end;else begin hh[i]:=hh[i-1]; ll[i]:=cc[i]; mm[i]:=mm[i-1]; k[i]:=3; y[i]:=8; end;end; IF y[i-1]=8 then begin IF cc[i]<=ll[i-1] then begin hh[i]:=ll[i-1]; ll[i]:=cc[i]; mm[i]:=hh[i]; k[i]:=4; y[i]:=8; end;else IF cc[i]>ll[i-1] and cc[i]<=mm[i-1] then begin hh[i]:=cc[i]; ll[i]:=ll[i-1]; mm[i]:=hh[i]; k[i]:=5; y[i]:=8; end;else begin hh[i]:=cc[i]; ll[i]:=ll[i-1]; mm[i]:=mm[i-1]; k[i]:=6; y[i]:=0; end;end; end; STICKLINE(k=1 or k=2 ,ll,hh,8,1),COLOR3333CC; STICKLINE(k=3 ,hh,mm,8,1),COLOR3333CC; STICKLINE(k=3 ,mm,ll,8,0),colorcyan; STICKLINE(k=4 or k=5 ,ll,hh,8,0),colorcyan; STICKLINE(k=6 ,ll,mm,8,0),colorcyan; STICKLINE(k=6 ,mm,hh,8,1),COLOR3333CC; MA(cc,5); MA(cc,20);股票论坛 www.55188.com |
|