编写要求:
STICKLINE( MA(CLOSE,60)>MA(CLOSE,120),MA(CLOSE,60),MA(CLOSE,120),8,0),COLOR000044;
STICKLINE( MA(CLOSE,60)=4.8 AND COUNT(ABS((C/REF(C,1)-1)*100)<=5.2,20)=20 OR (C-REF(C,1))/REF(C,1)*100>9.5,NODRAW;
STICKLINE(涨停,C,O,2,0),COLOR00FFFF;
STICKLINE(涨停,L,H,0,0),COLOR00FFFF;
{MACD指标}
DIF:=EMA(CLOSE,5)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD1:=DIF>DEA;
MACD2:=DIF>0 AND DEA>0 AND DIF>REF(DIF,1);
A1:=CLOSE>REF(C,1);
A2:=C>MA(C,5) AND C>MA(C,10) AND C>MA(C,20) AND C>MA(C,60) AND C>MA(C,120);
A3:=REF(C,1)0;}
VMA5:=MA(V,5);
VMA20:=MA(V,20);
VB1:=V>REF(V,1);
VB2:=VMA5>VMA20 OR VMA5>=REF(VMA5,1);
BB1:=A4 AND VB1 AND VB2;
CC1:=A4 AND MA60>=REF(MA60,1) AND VMA5>REF(VMA5,1) AND MACD1;
DRAWTEXT(BB1,MA20-0.3,'重上五线'),COLORLIMAGENTA;
DRAWTEXT(CC1,MA60-0.3,'60线顺上'),COLORGREEN;
C1:=C>MA5 AND CROSS(MA10,MA20) AND VB2 AND DIF>=REF(DIF,1);
C2:=C>MA5 AND CROSS(MA5,MA10) AND MA10>MA20 AND VB2 AND DIF>=DEA;
三线顺:=C1 OR C2;
DRAWTEXT(三线顺,MA20-0.2,'三线顺'),COLORYELLOW;
N2:=7;
LCA:=REF(CLOSE,1);
XQ:=SMA(MAX(CLOSE-LCA,0),N2,1)/SMA(ABS(CLOSE-LCA),N2,1)*100,COLORYELLOW,LINETHICK1;
天使:=DRAWLINE(XQ>=HHV(XQ,N2),XQ,XQ<=LLV(XQ,N2),XQ,1),COLOR00FF00;
王子:=DRAWLINE(XQ>=HHV(XQ,N2),XQ,XQ<=LLV(XQ,N2),1,XQ),COLOR00FF00;
TJ0:=XQ=王子;
TJ1:=XQ=天使;
TJ2:=XQ[REF(1,XQ);
JRS1:=DRAWICON(TJ1 AND TJ2,XQ,1);
JRS2:=DRAWICON(TJ0 AND TJ3,XQ,2);
DRAWICON(FILTER(JRS2>0,1),H*1.01,2);{画向下箭头}
VARCA:=1=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)<=REF(ZIG(3,5),3));
VARD:=1=(ZIG(3,5)][=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)>=REF(ZIG(3,5),3));
DRAWICON(VARCA ,L*0.96,1);{画向上箭头}
{以下为逃顶}
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);
逃:=CROSS(88,RSI);
DRAWTEXT(CROSS(88,RSI),H*1.008,'逃'),COLORYELLOW;
VAR6Q:=REF(CLOSE,1);
VAR7Q:=SMA(MAX(CLOSE-VAR6Q,0),6,1)/SMA(ABS(CLOSE-VAR6Q),6,1)*100;
DRAWTEXT(CROSS(84,VAR7Q),H*1.03,'逃顶'),COLORYELLOW ;
VAR3P:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR3P>90,L*0.93,L*0.92,1,0),COLORFF00FF;
DRAWTEXT(VAR3P>90,LOW*0.92,'追涨'),COLORFF00FF;
VAR51:=EMA(AMOUNT/VOL/100,3);
VAR52:=EMA(VAR51,88);
VAR53:=EMA(VAR51,88)*0.85;
VAR54:=VAR53*0.87;
VAR55:=LOWREF(CLOSE,1)*1.02;
DRAWTEXT(FILTER(VAR55,6),LOW+0.1,'坚决●买进'), COLORYELLOW;
{AA:=CROSS(MA(C,5),MA(C,20)) AND CROSS(MA(C,5),MA(C,30)) AND CROSS(MA(C,5),MA(C,60));
BB:=MA(C,60)>MA(C,10) AND CROSS(MA(C,10),MA(C,30)) AND MA(C,30)>MA(C,20) AND ABS(MA(C,60)-MA(C,20))/MA(C,20)<0.05;
CC:=MA(C,30)>MA(C,5) AND CROSS(MA(C,5),MA(C,20)) AND MA(C,20)>MA(C,10), COLORYELLOW;
DD:=ABS((MA(C,5)-MA(C,10))+(MA(C,10)-MA(C,20))+(MA(C,20)-MA(C,30)))<0.02 AND MA(C,5)>REF(MA(C,5),1) AND MA(C,10)>REF(MA(C,10),1);
EE:=MA(C,20)>MA(C,5) AND CROSS(MA(C,5),MA(C,10)) AND MA(C,10)>MA(C,60) AND ABS(MA(C,20)-MA(C,60))/MA(C,60)<0.05;
FF:=AA OR BB OR CC OR DD OR EE ;
DRAWTEXT(FF,L*0.99,'庄影'),COLORYELLOW;
STICKLINE(FF,H,L,0.5,0),COLORYELLOW;};
{以下为未来函数}
GET:=ZIG(3,3);
底部:=GET>REF(GET,1) AND REF(GET,2)>REF(GET,1);
XG:=COUNT(底部,3);
短买:=XG=1 AND REF(XG,1)=0;
DRAWICON(短买,LOW*0.98,17);
{周线指标}
{JJ:="KDJ.J"#WEEK;
JD:="KDJ.D"#WEEK;
JK:="KDJ.K"#WEEK;
金叉:=CROSS(JK,JD) AND CROSS(JJ,JD) AND CROSS(JJ,JK);
DRAWTEXT(金叉,MA60*0.98,'周金叉');}
{MJ:="KDJ.J"#MONTH;
MD:="KDJ.D"#MONTH;
MK:="KDJ.K"#MONTH;
月金叉:=CROSS(MK,MD) AND CROSS(MJ,MD) AND CROSS(MJ,MK);
DRAWTEXT(月金叉,MA60*1.02,'月金叉'),COLORRED;};]
解答:
?VARCA:=1=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)<=REF(ZIG(3,5),3));