编写条件:
编写方法:
网友求助:
条件要求:出现B点的选出来
源码如下:
MIDA:=MA(C,20);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
中轨:REF(MIDA,1);
上轨:REF(UPPERA,1);
下轨:REF(LOWERA,1);
DRAWICON(C>下轨 AND (REF(L,1)<REF(下轨,1) OR L<下轨) AND REF(C>下轨 AND (REF(L,1)<REF(下轨,1) OR L<下轨),1)=0,L*0.98,1);
DRAWICON(crOSS(上轨,C) AND REF(C,1)>REF(上轨,1),H*1.02,2);
DRAWICON(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨) AND REF(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨),1)=0,L*0.98,7);
DRAWICON(CROSS(中轨,C) AND REF(C,1)>REF(中轨,1),L*0.98,8);
涨停:=C>=REF(C,1)*1.099 AND C=H;
DRAWTEXT(涨停,L*0.97,'涨停'),COLOR00FFFF;
跌停:=C<=REF(C,1)/1.099 AND C=L;
STICKLINE(跌停,O,C,2.5,0),COLORFFFFFF;
STICKLINE(跌停,H,L,0,1),COLORFFFFFF;
源码如下:
MIDA:=MA(C,20);
VART1:=POW((C-MIDA),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPERA:=MIDA+2*VART3;
LOWERA:=MIDA-2*VART3;
中轨:REF(MIDA,1);
上轨:REF(UPPERA,1);
下轨:REF(LOWERA,1);
DRAWICON(C>下轨 AND (REF(L,1)<REF(下轨,1) OR L<下轨) AND REF(C>下轨 AND (REF(L,1)<REF(下轨,1) OR L<下轨),1)=0,L*0.98,1);
DRAWICON(crOSS(上轨,C) AND REF(C,1)>REF(上轨,1),H*1.02,2);
DRAWICON(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨) AND REF(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨),1)=0,L*0.98,7);
DRAWICON(CROSS(中轨,C) AND REF(C,1)>REF(中轨,1),L*0.98,8);
涨停:=C>=REF(C,1)*1.099 AND C=H;
DRAWTEXT(涨停,L*0.97,'涨停'),COLOR00FFFF;
跌停:=C<=REF(C,1)/1.099 AND C=L;
STICKLINE(跌停,O,C,2.5,0),COLORFFFFFF;
STICKLINE(跌停,H,L,0,1),COLORFFFFFF;
解答如下:
中轨:=REF(MA(C,20),1);
C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨) AND REF(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨),1)=0;
C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨) AND REF(C>中轨 AND (REF(L,1)<REF(中轨,1) OR L<中轨),1)=0;