2008-05-24
划线部分带有未来函数,只是参考,主要的文字提醒部分无未来函数。
input:p1(28,20,32),p2(32,32,35),p3(35,35,38),n(3,0,20),m(20,0,100);
ma5:ma(close,3);
ma10:ma(close,7);
ma20:ma(close,20);
ma30:ma(close,30);
ma60:=ma(close,60);
var1:=if(date<1500830 and date>900101,1,0);
var2:=llv(low,10);
var3:=hhv(high,25);
k1:=(p1/10)*var1*100;
k2:=(p2/10)*var1*100;
k3:=(p3/10)*var1*100;
rsv:=(c-llv(l,9))/(hhv(h,9)-llv(l,9))*100;
k:=sma(rsv,3,1);
d:=sma(k,3,1);
j:=3*k-2*d;
x:=llv(j,2)=llv(j,8);
y:=if(cross(j,ref(j 0.01,1)) and x and j<20,30,0);
主力:=ema( (close-ma(close,n))/ma(close,n)*4800,2);
散户:=ema( (close-ma(close,m))/ma(close,m)*4800,7);
动能趋势线:=100*ema((close-var2)/(var3-var2)*4,4)*var1;
{drawtext(cross(动能趋势线,k1),high*1.005,'!'),colorgreen};
drawtext(cross(动能趋势线,k2),high*1.003,'!'{减}),color00ff00;
drawtext(cross(动能趋势线,k3),high*1.001,'─'),colorwhite;
drawtext(cross(j,ref(j 0.01,1)) and x and j<20,low,'短'),colorff00ff;< /p>
aaa1:=barslast(ref(cross("macd.diff"(12,26,9),"macd.dea"(12,26,9)),1));
bbb1:=ref(c,aaa1 1)>c and ref("macd.diff"(12,26,9),aaa1 1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));
aaa2:=barslast(ref(cross("kdj.k"(9,9,3),"kdj.d"(9,9,3)),1));
bbb2:=ref(c,aaa2 1)>c and ref("kdj.k"(2,2,2),aaa2 1)<"kdj.k"(2,2,2) and cross("kdj.k"(2,2,2),"kdj.d"(2,2,2));
{drawtext(filter(bb2>0,5),l-0.01,'k底'),colorff00ff};
aaa3:=barslast(ref(cross("rsi.rsi1"(6,12,24),"rsi.rsi2"(6,12,24)),1));
bbb3:=ref(c,aaa3 1)>c and ref("rsi.rsi1"(6,12,24),aaa3 1)<"rsi.rsi1"(6,12,24) and cross("rsi.rsi1"(6,12,24),"rsi.rsi2"(6,12,24));
drawtext(filter(bbb3>0,5),l-0.001,'r底'),colorffcc66;
ccc1:=barslast(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));
ddd1:=ref(c,ccc1 1)"macd.diff"(12,26,9) and cross("macd.dea"(12,26,9),"macd.diff"(12,26,9));
drawtext(filter(ddd1>0,5),h 0.005,'m顶'),color0066ff;
ccc2:=barslast(ref(cross("kdj.d"(9,9,3),"kdj.k"(9,9,3)),1));
ddd2:=ref(c,ccc2 1)"kdj.k"(9,9,3) and cross("kdj.d"(9,9,3),"kdj.k"(9,9,3));
drawtext(filter(ddd1>0,5),h 0.01,'k'),color00ff00;
ccc3:=barslast(ref(cross("rsi.rsi2"(6,12,24),"rsi.rsi1"(6,12,24)),1));
dd3:=ref(c,ccc3 1)"rsi.rsi1"(6,12,24) and cross("rsi.rsi2"(6,12,24),"rsi.rsi1"(6,12,24));
drawtext(filter(ddd1>0,5),h 0.008,'r'),colorffffcc;
aa1:=amount/v;
bb1:=l<aa1*0.9;
cc1:=(c-ref(c,1))/ref(c,1)*100>1.2;
dd1:=l<ma(c,5)*0.921;
ee1:=v<ma(v,5)*1.5;
ff1:=bb1 and cc1 and dd1 and ee1;
drawtext(ff1,(low* 0.99),'鼠仓'),color4080ff;
a51:=3*sma((c-llv(l,55))/(hhv(h,55)-llv(l,55))*100,5,1)-2*sma((c-llv(l,55))/(hhv(h,55)-llv(l,55))*100,5,1);
黑马线:=ema(a51,5);
a54:=((c-llv(l,21))/(hhv(h,21)-llv(l,21)))*100;
趋势线:=(ma(3*sma(a54,6,1)-2*sma(sma(a54,5,1),5,1),2));
{drawtext(cross(趋势线,0)and 黑马线<60,(high* 0.98),'▲大黑马'),coloryellow};
lc:=ref(close,1);
rsi:=((sma(max((close - lc),0),3,1) / sma(abs((close - lc)),3,1)) * 100);
ff:=ema(close,5);
ma15:=ema(close,15);
ma17:=ema(close,18);
{drawtext(cross(ff,ma15),(low * 0.999),'底'),colora6e500};
{drawtext(cross(rsi,88),(low * 1.00),'出'),colora6e500};
drawtext(cross(88,rsi),(h * 1.0009),'顶!'),colorffe900;
xg:=hhv(h,480);
drawtext(filter(cross(c,ref(xg,1)),10),c*0.99,'突'),coloryellow;