编写要求:
n:3 0 100 nn:30 0 111 pp:55 1 111 {if datacount<3 then exit; HH:=H; LL:=L; pL:=ll[datacount]; pH:=0; tk:=if(l>ref(h,1),1,if(hpH then pH:=hh; if tk=1 and pL<=hh[i-1] then tk:=0; if tk=-1 and pH>=ll[i-1] then tk:=0; end; DRAWTEXT(tk=1,l-(l-ref(h,1))/2,'未补'),COLORmagenta,ALIGN1; DRAWTEXT(tk=-1,h+(ref(l,1)-h)/2,'未补'),COLORgreen,ALIGN1 ; DRAWSL(tk=1,REF(h,1),0,0,0)COLORRED; DRAWSL(tk=1,l,0,0,0)COLORRED; DRAWSL(tk=-1,REF(l,1),0,0,0)COLORCYAN; DRAWSL(tk=-1,h,0,0,0)COLORCYAN;} C3:=REF(C,1); 涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0); STICKLINE(涨停,OPEN,CLOSE,7,0),COLORRED; STICKLINE(涨停,h,h,80,0),COLORRED,shift4; 跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0); STICKLINE(跌停,OPEN,CLOSE,7,0),COLORGREEN; lnn:=BARSLAST((VOL=HHV(VOL,nn))); K:=lnn=0; K1:=SUMBARS(K,1); STICKLINE(K1<=30,REF(h,K1-1)*1,REF(h,K1-1),pp,0),COLORyellow,shift3; STICKLINE(K1<=30,REF(LOW,K1-1)*1,REF(LOW,K1-1),pp,0),COLORgreen,shift3; STICKLINE(K1<=1,REF(OPEN,K1-1)*1,REF(CLOSE,K1-1),4,0),COLORyellow; STICKLINE(K1<=1,REF(HIGH,K1-1)*1,REF(LOW,K1-1),1,0),COLORyellow; 平顶:=h=ref(h,1) or (h=ref(h,2) and h>ref(h,1)); 顶:partline(平顶,h),coloryellow,linethick2; 平底:=l=ref(l,1) or (l=ref(l,2) and lREFX(D,1),DAY,-1); c2:="001.c1#MONTH"; o2:="001.o1#MONTH"; h2:="001.h1#MONTH"; l2:="001.l1#MONTH"; yj:=(c2>o2 or c2=o2 and c2>REF(c2,DAY)); IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(t2 and yj,h2,c2,10,1)color3F7CFF; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(t2 and yj,l2,o2,10,1)color3F7CFF; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(t2 and NOT(yj),h2,o2,10,1)ColorF38593; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(t2 and NOT(yj),l2,c2,10,1)ColorF38593; IF DATACOUNT-2=SYSPARAM(1) then PARTLINE(D>REF(D,1)and yj ,c2)color3F7CFF; IF DATACOUNT-2=SYSPARAM(1) then PARTLINE(D>REF(D,1)and NOT(yj),C2)ColorF38593; IF DATACOUNT-2=SYSPARAM(1) then PARTLINE(D>REF(D,1)and yj ,O2)color3F7CFF; IF DATACOUNT-2=SYSPARAM(1) then PARTLINE(D>REF(D,1)and NOT(yj) ,O2)ColorF38593; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(YQ>0 and yj,c2,o2,0.5,0)color3F7CFF; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(YD>0 and yj,c2,o2,0.5,0)color3F7CFF; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(YQ>0 and NOT(yj),c2,o2,0.5,0)ColorF38593; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(YD>0 and NOT(yj),c2,o2,0.5,0)ColorF38593; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(t2 and yj,c2+(h2-c2)/n,o2-(o2-l2)/n,9.9,0)COLORBLACK; IF DATACOUNT-2=SYSPARAM(1) then STICKLINE(t2 and NOT(yj),c2-(c2-l2)/n,o2+(h2-o2)/n,9.9,0)COLORBLACK; Z:=WEEKDAY; Zd1:=IF(Z>REF(Z,1),WEEKDAY,1); ZQa:=IF(Zd1REFX(Z1,1),z1,-1); zj:=(c1>o1 or c1=o1 and c1>REF(c1,z1)); IF DATACOUNT-1=SYSPARAM(1) then PARTLINE(z1>REF(Z1,1)and zj,l1)Color9973FD,linethick1; IF DATACOUNT-1=SYSPARAM(1) then PARTLINE(Z1>REF(Z1,1)and zj,h1)Color9973FD,linethick1; IF DATACOUNT-1=SYSPARAM(1) then PARTLINE(Z1>REF(Z1,1)and NOT(zj),h1)Color9DFC48,linethick1; IF DATACOUNT-1=SYSPARAM(1) then PARTLINE(Z1>REF(Z1,1)and NOT(zj),l1)Color9DFC48,linethick1; IF DATACOUNT-1=SYSPARAM(1) then STICKLINE(ZQa>0and zj,h1,l1,0.5,0)Color9973FD,linethick1; IF DATACOUNT-1=SYSPARAM(1) then STICKLINE(ZDa>0and zj,h1,l1,0.5,0)Color9973FD,linethick1; IF DATACOUNT-1=SYSPARAM(1) then STICKLINE(ZQa>0and NOT(zj),h1,l1,0.5,0)Color9DFC48,linethick1; IF DATACOUNT-1=SYSPARAM(1) then STICKLINE(ZDa>0and NOT(zj),h1,l1,0.5,0)Color9DFC48,linethick1; STICKLINE(ISLASTBAR,CLOSE*1.1,CLOSE*1.1,45,1),colorred,shift3; DRAWNUMBER(ISLASTBAR,CLOSE*1.1,CLOSE*1.1,2),coloryellow,shift1; DRAWTEXT(ISLASTBAR,CLOSE*1.08,'涨停'),COLORGREEN,shift1; ma5:EMA(CLOSE,5); ma10:EMA(CLOSE,17),colorwhite, LINETHICK2; ma18:EMA(CLOSE,25), coloryellow, LINETHICK2; ma30:EMA(CLOSE,50),colormagenta,, LINETHICK2; ma60:=MA(CLOSE,60), LINETHICK2; 半分位:=REF((HIGH+LOW)/2,1),COLORYELLOW; STICKLINE(半分位,半分位,半分位,4,1),COLORyellow,LINETHICK1; input:N(3); J1:=ISLASTBAR; J2:=REF(HIGH,N)=HHV(HIGH,2*N+1); J3:=FILTER(J2,N); J4:=BACKSET(J3,N+1); J5:=FILTER(J4,N); J6:=J5 OR J1; J7:=REF(LOW,N)=LLV(LOW,2*N+1); J8:=FILTER(J7,N); J9:=BACKSET(J8,N+1); JA:=FILTER(J9,N); JB:=JA AND NOT(J5); JC:=BACKSET(J6,REF(BARSLAST(JB),1)+1); JD:=JC>REF(JC,1); JE:=BACKSET(JD,2); JF:=JE>REF(JE,1); J10:=BACKSET(JF AND COUNT(J6,REF(BARSLAST(JB),1)+2)=0,REF(BARSLAST(JB),1)+2); J11:=J10>REF(J10,1); J12:=BACKSET(J11 AND COUNT(J6,REF(BARSLAST(JB),1)+2)=0,REF(BARSLAST(JB),1)+2); J13:=J12>REF(J12,1); J14:=IF(J6,COUNT(JB,REF(BARSLAST(J6),1)+1),0); J15:=IF(J14=1 AND J6,BARSLAST(JF),0); J16:=IF(J6 AND REF(LOW,BARSLAST(JF))>=REF(LOW,BARSLAST(J11)),BARSLAST(J11),BARSLAST(JF)); J17:=IF(J14=2 AND J6,J16,0); J18:=IF(J14>=3 AND J6,IF(J6 AND REF(LOW,J16)>=REF(LOW,BARSLAST(J13)),BARSLAST(J13),J16),0); J19:=J15+J17+J18; J1A:=BACKSET(J6,J19); J1B:=J1A>REF(J1A,1); J1C:=BACKSET(J1B,2); J1D:=J1C>REF(J1C,1); J1E:=J1D OR J1; J1F:=BACKSET(J1E,REF(BARSLAST(J6),1)+1); J20:=J1F>REF(J1F,1); J21:=BACKSET(J20,2); J22:=J21>REF(J21,1); J23:=BACKSET(J22 AND COUNT(J1E,REF(BARSLAST(J6),1)+2)=0,REF(BARSLAST(J6),1)+2); J24:=J23>REF(J23,1); J25:=BACKSET(J24 AND COUNT(J1E,REF(BARSLAST(J6),1)+2)=0,REF(BARSLAST(J6),1)+2); J26:=J25>REF(J25,1); J27:=IF(J1E,COUNT(J5,REF(BARSLAST(J1E),1)+1),0); J28:=IF(J27=1 AND J1E,BARSLAST(J22),0); J29:=IF(J1E AND REF(HIGH,BARSLAST(J22))<=REF(HIGH,BARSLAST(J24)),BARSLAST(J24),BARSLAST(J22)); J2A:=IF(J27=2 AND J1E,J29,0); J2B:=IF(J27>=3 AND J1E,IF(J1E AND REF(HIGH,J29)<=REF(HIGH,BARSLAST(J26)),BARSLAST(J26),J29),0); J2C:=J28+J2A+J2B; J2D:=BACKSET(J1E,J2C); J2E:=J2D>REF(J2D,1); J2F:=BACKSET(J2E,2); J30:=J2F>REF(J2F,1); J37:=BACKSET(J1,BARSLAST(J1D)+1); J38:=J37>REF(J37,1); J39:=BACKSET(J38,REF(BARSLAST(J1D),1)+2); J3A:=J39>REF(J39,1); J3B:=BACKSET(J1,BARSLAST(J30)+1); J3C:=J3B>REF(J3B,1); J3D:=BACKSET(J3C,REF(BARSLAST(J30),1)+2); J3E:=J3D>REF(J3D,1),Coloryellow,POINTDOT; DRAWLINE(J3A,LOW,J38,LOW,1),Coloryellow,POINTDOT; DRAWLINE(J3E,HIGH,J3C,HIGH,1),Coloryellow,POINTDOT; 前一低: REF(LOW,BARSLAST(J38)),Colorcyan,POINTDOT,Linethick3; 前二低: REF(LOW,BARSLAST(J3A)),Colormagenta,POINTDOT,Linethick2; 前一高: REF(HIGH,BARSLAST(J3C)),Colorcyan,POINTDOT,Linethick3; 前二高: REF(HIGH,BARSLAST(J3E)),Colormagenta,POINTDOT,Linethick2; DRAWTEXT(VOL<=REF(LLV(VOL,34),1),LOW*0.99,'★'),COLORyellow
解答:
?{N(1,100,3)}
J1:=ISLASTBAR;
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!