新布林帮忙改一下 [文华财经]
-
咨询内容:
{精准买卖指示(主图指标)}N:=20;MA1:=MA(CLOSE,7);MA2:=MA(CLOSE,13);MA3:=MA(CLOSE,34);MA4:=MA(CLOSE,50);VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;VAR7:=0;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);B:=IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'入',COLORRED;S:=IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;DRAWTEXT(卖1>0,HIGH*1.02,'出',COLORGREEN;VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));BOLL:MA(CLOSE,N),LINETHICK2,COLORWHITE;UB:BOLL+2*STD(CLOSE,N),LINETHICK2,COLORYELLOW;LB:BOLL-2*STD(CLOSE,N),LINETHICK2,COLORMAGENTA;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);K:=EMA(VAR7,5)*2, , COLORFF00FF;D:=EMA(K,5), , COLORWHITE;J:=K*3-D*2, ,COLORYELLOW;VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;HS:=VOL/CAPITAL*100, , COLORGREEN;VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'金进场',LINETHICK1,COLORFF00FF;VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,LOW*0.95,'#39) COLORWHITE;量能突破:=SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),VOL,-VOL)),0);
ZJ1953:=ZIG(C,15);粉丝:=MA(ZJ1953,3);DRAWTEXT(CROSS(ZJ1953,粉丝),LOW*1.025,'基金入场 ',COLORMAGENTA;DRAWTEXT(CROSS(粉丝,ZJ1953),HIGH*0.988,'基金清仓 ',COLORFFFFFF;阻力价:HHV(HIGH,19),COLORGREEN,LINETHICK1,NODRAW;A:=(3*C+L+O+H)/6;X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;主力成本线:EMA(X,13),COLORMAGENTA,LINETHICK0;UR:=2; LR:=4;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}LR1:=FORCAST(C,NOD+1);NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8,NODRAW;{近点}{隐藏}LR2:=SLOPE(C,NOD+1);LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8,NODRAW;{远点}{隐藏}EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8,NODRAW;{隐藏}AD:=ABS(NP-FP);{高差};DBL:=BARSLAST(BC1!=DRAWNULL)+1;DBH:=BARSLAST(TC1!=DRAWNULL)+1;BSP:=IF(BC2>TC2,DBL,DBH)-1;LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);AT2:=HHV(AT1-LRL,MAX(BC2,TC2));AT3:=CONST(BARSLAST(AT1-LRL=AT2));AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));ATL:=LRL+AT5;UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);UT2:=HHV(LRL-UT1,MAX(BC2,TC2));UT3:=CONST(BARSLAST(LRL-UT1=UT2));UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));UTL:=LRL-UT5;RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));{限制高}RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));{限制低}中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLOR666666,LINETHICK2;上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLOR666666,LINETHICK2;下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLOR666666,LINETHICK2;VAR1:=(C+H+O+L)/4;顶阴影线:=XMA(VAR1,20)*(1+1/8),COLORGREEN,LINETHICK1;DRAWTEXT(CROSS(HIGH,顶阴影线),HIGH*0.990,'逃',COLORGREEN;
局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=TOPRANGE(H);低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);距前高天A:=BARSLAST(高保留=1);距前低天A:=BARSLAST(低保留=-1);预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);距前高天YA:=BARSLAST(高保留X=1);距前低天YA:=BARSLAST(低保留X=-1);预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLORYELLOW;DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0)COLORLIRED;DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0)COLORYELLOW;DD1:=BARSLAST(ABS(极点保留)!=1);DRAWTEXT(极点保留=1,局部极点,'#39),COLORGREEN;DRAWTEXT(极点保留=-1,局部极点,'#39),COLORRED;
高点:=10;低点:=10;高点选择:=1;低点选择:=1;波浪尺1:=0;波浪尺2:=1;PURC:=CONST(FINDHIGH(H,0,高点*10,高点选择));PLZ:=CONST(BARSLAST(PURC=H))+1;顶X:=CONST(IF(PLZ=1,H,REF(H,PLZ-1)));QQT:=CONST(FINDLOW(L,0,低点*10,低点选择));PLL:=CONST(BARSLAST(QQT=L))+1;低X:=CONST(IF(PLL=1,L,REF(L,PLL-1)));DRAWKLINE(H,O,L,C);顶点:顶X,COLORRED;底点:低X,COLORRED;波动速率:=100*((顶X-低X)/(IF(PLL>PLZ,低X,顶X)))/(PLL-PLZ),NODRAW,COLORMAGENTA;波动幅度:=((顶X-低X)/(IF(PLL>PLZ,低X,顶X)))*100;波动价位:=(顶X-低X)*(IF(PLL>PLZ,1,-1));BPURC:=CONST(FINDHIGH(H,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));BPLZ:=CONST(BARSLAST(BPURC=H))+1;BQQT:=CONST(FINDLOW(L,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));BPLL:=CONST(BARSLAST(BQQT=L))+1;BLC1:=CONST(FINDHIGH(H,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));BLC2:=CONST(BARSLAST(BPURC=H))+1;BLC顶X:=CONST(IF(BPLZ=1,H,REF(H,BPLZ-1)));BLC3:=CONST(FINDLOW(L,0,(IF(波浪尺1>0,波浪尺1,IF(PLZ<PLL,高点,低点)))*5,波浪尺2));B6C4:=CONST(BARSLAST(BQQT=L))+1;BLC低X:=CONST(IF(BPLL=1,L,REF(L,BPLL-1)));BASE:=IF(波动速率<0,BLC顶X,BLC低X)COLORRED;BLCX:=IF(波动速率<0,-1,1);BLCZ:=(顶点-底点)*(IF(PLL>PLZ,1,-1));B618:=BASE+(BLCZ*0.618)COLORRED,DOTLINE;B382:=BASE+(BLCZ*0.382)COLORRED,DOTLINE;B05:=BASE+(BLCZ*0.5)COLORRED,DOTLINE;B809:=BASE+(BLCZ*0.809)COLORRED,DOTLINE;B191:=BASE+(BLCZ*0.191)COLORRED,DOTLINE;B100:=BASE+(BLCZ*1)COLORRED;B200:=BASE+(BLCZ*2)COLORRED;B11:=BASE+(BLCZ*1.191)COLORRED;B12:=BASE+(BLCZ*1.382)COLORRED;B13:=BASE+(BLCZ*1.5)COLORRED;B14:=BASE+(BLCZ*1.618)COLORRED;B15:=BASE+(BLCZ*1.809)COLORRED;BZ1:=BASE+(BLCZ*0.236)COLORRED;BZ2:=BASE+(BLCZ*1.236)COLORRED;BZ3:=BASE+(BLCZ*2.236)COLORRED;B11B:=BASE+(BLCZ*2.191)COLORRED;B12B:=BASE+(BLCZ*2.382)COLORRED;B13B:=BASE+(BLCZ*2.5)COLORRED;B14B:=BASE+(BLCZ*2.618)COLORRED;B15B:=BASE+(BLCZ*2.809)COLORRED;B300:=BASE+(BLCZ*3)COLORRED;XZDD:=IF(PLL>PLZ,BPLL,BPLZ);QADQ:=IF(PLL>PLZ,PLL,PLZ);QADH:=IF(PLL>PLZ,PLZ,PLL);QHL1:=IF(PLL>PLZ,L,H);QHL2:=IF(PLL>PLZ,H,L);DRAWLINE(CURRBARSCOUNT=QADQ,QHL1,CURRBARSCOUNT=QADH,QHL2,0)COLORRED;DRAWLINE(CURRBARSCOUNT=QADH,QHL2,CURRBARSCOUNT=XZDD,QHL1,0)COLORRED;
JRH:=HHV(C,2);JRL:=LLV(C,2);
YTSL:=(3*C+L+O+H)/6;Z1D:=C>=REF(C,1);Z1X:=C<=REF(C,1);Z2D:=C>=REF(C,2);Z2X:=C<=REF(C,2);X1D2:=Z1X AND Z2D;D1X2:=Z1D AND Z2X;R1:=Z1D AND Z2D;R2:=REF(R1,1) AND X1D2;R3:=REF(R2,1) AND D1X2;R4:=REF(R3,1) AND X1D2;R5:=REF(R4,1) AND D1X2;R6:=REF(R5,1) AND X1D2;R7:=REF(R6,1) AND D1X2;R8:=REF(R7,1) AND X1D2;R9:=REF(R8,1) AND D1X2;RA:=REF(R9,1) AND X1D2;RB:=REF(RA,1) AND D1X2;RC:=REF(RB,1) AND X1D2;RD:=Z1X AND Z2X;RE:=REF(RD,1) AND D1X2;RF:=REF(RE,1) AND X1D2;R10:=REF(RF,1) AND D1X2;R11:=REF(R10,1) AND X1D2;R12:=REF(R11,1) AND D1X2;R13:=REF(R12,1) AND X1D2;R14:=REF(R13,1) AND D1X2;R15:=REF(R14,1) AND X1D2;R16:=REF(R15,1) AND D1X2;R17:=REF(R16,1) AND X1D2;R18:=REF(R17,1) AND D1X2;R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
红色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:REF(离场,1)COLORGREEN,NODRAW;青色观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORRED,NODRAW;短买:R19,COLORLIRED,NODRAW;STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2,POINTDOT,COLORGREEN,LINETHICK4;TT:=240/FROMOPEN;比:=TT;J12:=(HIGH - ((HIGH - LOW) / 3));J23:=(LOW + ((HIGH - LOW) / 3));AAA:=CONST(HHV(H,90));BBB:=CONST(LLV(L,100));DRAWKLINE(H,O,L,C);
升:=EMA(C,2),COLOR000000;降:=EMA(SLOPE(C,12)*20+C,30),COLOR000000;买:=CROSS(升,降);卖:=CROSS(降,升);
BUY1:=ZIG(3,10);SELL1:=MA(BUY1,2);DRAWICON(CROSS(BUY1,SELL1),L-0.3,7);DRAWICON(CROSS(SELL1,BUY1),H+0.2,8);STICKLINE(BUY1>SELL1 AND O>=C,C,O,-1,0),COLORRED;STICKLINE(BUY1>SELL1 AND O>=C,L,H,0,0),COLORRED;STICKLINE(BUY1<SELL1 AND O<=C,O,C,-1,1),COLORCYAN;STICKLINE(BUY1<SELL1 AND O<=C,O,L,0,1),COLORCYAN;STICKLINE(BUY1<SELL1 AND O<=C,C,H,0,1),COLORCYAN;
GET:ZIG(3,5),COLORAAAAAA;PL5:=ZIG(3,5);EN1:=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);EX1:=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);PL10:=ZIG(3,13);EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)<=REF(ZIG(3,10),3);EX2:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG(3,10),2)>=REF(ZIG(3,10),3);PL20:=ZIG(3,26);EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)<=REF(ZIG(3,20),3);EX3:=ZIG(3,20)<REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG(3,20),2)>=REF(ZIG(3,20),3);PL40:=ZIG(3,55);走强一:=BARSLAST(PL5<REF(PL5,1));走弱一:=BARSLAST(PL5>REF(PL5,1));走强二 :=BARSLAST(PL10<REF(PL10,1));走弱二:=BARSLAST(PL10>REF(PL10,1));走强三:=BARSLAST(PL20<REF(PL20,1));走弱三:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强二 ),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强二 ),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱二),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱二),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强三),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强三),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱三),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱三),0);DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.97,'ⅠA)',COLORFFFF00;DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.03,'ⅡB)',COLORFFFF00;DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.97,'ⅢC全仓)',COLORFFFF00;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'-----⑴空',COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'++⑵全仓多',COLOR0000FF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'空',COLOR0000FF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'全仓多',COLOR0000FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'顶',COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'A】多',COLOR00FF00;DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.05,'B】空',COLOR00FF00;DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'C】全仓多',COLOR00FF00;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'空进',COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.96,'多全仓',COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'空',COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.96,'多补',COLOR00FFFF;来源:程序化99
-
文华技术人员:
参考:
N:=20;
AMOUNT:=AVPRICE*V;
CAPITAL:=GETPRICE1('流通股本');
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);
MA1:=MA(CLOSE,7);
MA2:=MA(CLOSE,13);
MA3:=MA(CLOSE,34);
MA4:=MA(CLOSE,50);
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(C,16,1,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIGZAG(C,6,1)>REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)<=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)<=REF(ZIGZAG(C,6,1),3);
VAR12:=ZIGZAG(C,6,1)<REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)>=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)>=REF(ZIGZAG(C,6,1),3);
VAR13:=ZIGZAG(C,22,1)>REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)<=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)<=REF(ZIGZAG(C,22,1),3);
VAR14:=ZIGZAG(C,22,1)<REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)>=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)>=REF(ZIGZAG(C,22,1),3);
VAR15:=ZIGZAG(C,51,1)>REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)<=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)<=REF(ZIGZAG(C,51,1),3);
VAR16:=ZIGZAG(C,51,1)<REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)>=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)>=REF(ZIGZAG(C,51,1),3);
VAR17:=ZIGZAG(C,72,1)>REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)<=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)<=REF(ZIGZAG(C,72,1),3);
VAR18:=ZIGZAG(C,72,1)<REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)>=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)>=REF(ZIGZAG(C,72,1),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:=IF(买1>0 OR 买2>0,LOW*0.99,NULL),CROSSDOT,LINETHICK3,COLORYELLOW;
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'买入'),COLORRED;
S:=IF(卖1>0,HIGH*1.01,NULL),CROSSDOT,LINETHICK3,COLORGREEN;
DRAWTEXT(卖1>0,HIGH*1.02,'卖出'),COLORGREEN;
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
BOL1L:MA(CLOSE,N),LINETHICK2,COLORWHITE;
UB:BOL1L+2*STD(CLOSE,N),LINETHICK2,COLORYELLOW;
LB:BOL1L-2*STD(CLOSE,N),LINETHICK2,COLORMAGENTA;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:=EMA(VAR7,5)*2, COLORFF00FF;
D:=EMA(K,5), COLORWHITE;
J:=K*3-D*2, COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;
HS:=VOL/CAPITAL*100, COLORGREEN;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'资金进场'),LINETHICK1,COLORFF00FF;
VAR1A:=IF(VARE>0,VARE,0);
VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,LOW*0.95,' '), COLORWHITE;
量能突破:=SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),VOL,-VOL)),0);
ZJ1953:=ZIGZAG(C,15,1);
粉丝:=MA(ZJ1953,3);
DRAWTEXT(CROSS(ZJ1953,粉丝),LOW*1.025,'↖基金入场 '),COLORMAGENTA;
DRAWTEXT(CROSS(粉丝,ZJ1953),HIGH*0.988,'←基金清仓 '),COLORFFFFFF;
阻力价:HHV(HIGH,19),COLORGREEN,LINETHICK1,NODRAW;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
主力成本线:EMA(X,13),COLORMAGENTA,NODRAW;
UR:=2;
LR:=4;
TC1:=IF(H=HHV(H,8*UR),H,NULL);
TC2:=REFX1(BARSLAST(TC1=H),10000)+1;
UPPER:=REFX1(IF(TC2=1,H,REF(H,TC2-1)),10000);
BC1:=IF(L=LLV(L,8*LR),L,NULL);
BC2:=REFX1(BARSLAST(BC1=L),10000)+1;
LOWER:=REFX1(IF(BC2=1,L,REF(L,BC2-1)),10000);
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;
{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;
{高点定位}
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));
{用时}
LR1:=FORCAST(C,NOD+1);
NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),REFX1(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1)),10000),NULL),POINTDOT,COLOR93BDA8,NODRAW;
{近点}{隐藏}
LR2:=SLOPE(C,NOD+1);
LR3:=REFX1(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)),10000);
FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8,NODRAW;EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8,NODRAW;AD:=ABS(NP-FP);DBL:=BARSLAST(NOT(ISNULL(BC1)) )+1;
DBH:=BARSLAST(NOT(ISNULL(TC1)) )+1;
BSP:=IF(BC2>TC2,DBL,DBH)-1;
LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);
AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
AT3:=REFX1(BARSLAST(AT1-LRL=AT2),10000);
AT4:=REFX1(IF(AT3=0,H,REF(H,AT3)),10000);
AT5:=REFX1(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)),10000);
ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);
UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
UT3:=REFX1(BARSLAST(LRL-UT1=UT2),10000);
UT4:=REFX1(IF(UT3=0,H,REF(H,UT3)),10000);
UT5:=REFX1(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)),10000);
UTL:=LRL-UT5;
RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,REFX1(REF(ATL,MIN(BC2,TC2)-11),10000));RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,REFX1(REF(UTL,MIN(BC2,TC2)-11),10000));中轨:IF(NP>FP,IF(LRL<=RH,LRL,NULL),IF(LRL>=RL,LRL,NULL)),COLOR666666,LINETHICK2;
上轨:IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLOR666666,LINETHICK2;
下轨:IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLOR666666,LINETHICK2;
VAR1:=(C+H+O+L)/4;
顶阴影线:=MA(VAR1,20)*(1+1/8),COLORGREEN,LINETHICK1;
DRAWTEXT(CROSS(HIGH,顶阴影线),HIGH*0.990,'↙逃'),COLORGREEN;
局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);
局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);
局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);
局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);
局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);
缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));
距前高天:=BARSLAST(局部高点预选C=1);
距前低天:=BARSLAST(局部低点预选C=-1);
小值周期:=LLVBARS(L,20);
大值周期:=HHVBARS(H,20);
低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);
预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)<>1) OR REF(低保留S,距前低天)=0,1,0);
判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);
预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)<>1) OR REF(高保留,距前高天)=0,1,0);
判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);
低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);
预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)<>1) OR REF(低保留,距前低天A)=0,1,0);
判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);
高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);
预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)<>1) OR REF(高保留XA,距前高天A)=0,1,0);
判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);
低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);
低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);
预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)<>1) OR REF(低保留X,距前低天YA)=0,1,0);
判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);
高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);
预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)<>1) OR REF(高保留YXA,距前高天YA)=0,1,0);
判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);
低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);
低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));
极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);
局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,NULL)), CIRCLEDOT, COLORYELLOW;
DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORRED;
DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORYELLOW;
DD1:=BARSLAST(ABS(极点保留)<>1);
DRAWTEXT(极点保留=1,局部极点,' '),COLORGREEN;
DRAWTEXT(极点保留=-1,局部极点,' '),COLORRED;
JRH:=HHV(C,2);
JRL:=LLV(C,2);YTSL:=(3*C+L+O+H)/6;
Z1D:=C>=REF(C,1);
Z1X:=C<=REF(C,1);
Z2D:=C>=REF(C,2);
Z2X:=C<=REF(C,2);
X1D2:=Z1X AND Z2D;
D1X2:=Z1D AND Z2X;
R1:=Z1D AND Z2D;
R2:=REF(R1,1) AND X1D2;
R3:=REF(R2,1) AND D1X2;
R4:=REF(R3,1) AND X1D2;
R5:=REF(R4,1) AND D1X2;
R6:=REF(R5,1) AND X1D2;
R7:=REF(R6,1) AND D1X2;
R8:=REF(R7,1) AND X1D2;
R9:=REF(R8,1) AND D1X2;
RA:=REF(R9,1) AND X1D2;
RB:=REF(RA,1) AND D1X2;
RC:=REF(RB,1) AND X1D2;
RD:=Z1X AND Z2X;
RE:=REF(RD,1) AND D1X2;
RF:=REF(RE,1) AND X1D2;
R10:=REF(RF,1) AND D1X2;
R11:=REF(R10,1) AND X1D2;
R12:=REF(R11,1) AND D1X2;
R13:=REF(R12,1) AND X1D2;
R14:=REF(R13,1) AND D1X2;
R15:=REF(R14,1) AND X1D2;
R16:=REF(R15,1) AND D1X2;
R17:=REF(R16,1) AND X1D2;
R18:=REF(R17,1) AND D1X2;
R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);
R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);红色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,COLOR0000FF,NODRAW;
离场:=IF(红色持股,JRL,NULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:REF(离场,1),COLORGREEN,NODRAW;
青色观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,COLORFFFF00,NODRAW;
进:=IF(青色观望,JRH,NULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:REF(明进场价,1),COLORRED,NODRAW;
短买:R19,COLORRED,NODRAW;
STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;
QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2,POINTDOT,COLORGREEN,LINETHICK4;
TT:=240/FROMOPEN;
比:=TT;
J12:=(HIGH - ((HIGH - LOW) / 3));
J23:=(LOW + ((HIGH - LOW) / 3));
AAA:=REFX1(HHV(H,90),10000);
BBB:=REFX1(LLV(L,100),10000);
DRAWKLINE1(H,O,L,C);
升:=EMA(C,2),COLOR000000;
降:=EMA(SLOPE(C,12)*20+C,30),COLOR000000;
买:=CROSS(升,降);
卖:=CROSS(降,升);
BUY1:=ZIGZAG(C,10,1);
SELL1:=MA(BUY1,2);
DRAWICON(CROSS(BUY1,SELL1),L-0.3,7);
DRAWICON(CROSS(SELL1,BUY1),H+0.2,8);
STICKLINE(BUY1>SELL1 AND O>=C,C,O,-1,0),COLORRED;
STICKLINE(BUY1>SELL1 AND O>=C,L,H,0,0),COLORRED;
STICKLINE(BUY1<SELL1 AND O<=C,O,C,-1,1),COLORCYAN;
STICKLINE(BUY1<SELL1 AND O<=C,O,L,0,1),COLORCYAN;
STICKLINE(BUY1<SELL1 AND O<=C,C,H,0,1),COLORCYAN;
PL5:=ZIGZAG(C,5,1);
EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);
EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);
PL10:=ZIGZAG(C,10,1);
EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);
EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);
PL20:=ZIGZAG(C,20,1);
EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);
EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.97,'(ⅠA)'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.03,'(ⅡB)'),COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.97,'(ⅢC全仓)'),COLORFFFF00;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'------⑴空'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'+++⑵全仓多'),COLOR0000FF;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'⑶空'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'⑷全仓多'),COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸顶'),COLOR0000FF;
DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'【A】多'),COLOR00FF00;
DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.05,'【B】空'),COLOR00FF00;
DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'【C】全仓多'),COLOR00FF00;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'①空进'),COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.96,'②多全仓'),COLOR00FFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'③空'),COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.96,'④多补'),COLOR00FFFF;来源: WWW.CXH99.COM
-
文华客服:
换回原始K线可以吗
-
网友回复:
参考:
N:=20;
AMOUNT:=AVPRICE*V;
CAPITAL:=GETPRICE1('通股本';
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);
MA1:=MA(CLOSE,7);
MA2:=MA(CLOSE,13);
MA3:=MA(CLOSE,34);
MA4:=MA(CLOSE,50);
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(C,16,1,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIGZAG(C,6,1)>REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)<=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)<=REF(ZIGZAG(C,6,1),3);
VAR12:=ZIGZAG(C,6,1)<REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)>=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)>=REF(ZIGZAG(C,6,1),3);
VAR13:=ZIGZAG(C,22,1)>REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)<=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)<=REF(ZIGZAG(C,22,1),3);
VAR14:=ZIGZAG(C,22,1)<REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)>=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)>=REF(ZIGZAG(C,22,1),3);
VAR15:=ZIGZAG(C,51,1)>REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)<=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)<=REF(ZIGZAG(C,51,1),3);
VAR16:=ZIGZAG(C,51,1)<REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)>=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)>=REF(ZIGZAG(C,51,1),3);
VAR17:=ZIGZAG(C,72,1)>REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)<=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)<=REF(ZIGZAG(C,72,1),3);
VAR18:=ZIGZAG(C,72,1)<REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)>=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)>=REF(ZIGZAG(C,72,1),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:=IF(买1>0 OR 买2>0,LOW*0.99,NULL),CROSSDOT,LINETHICK3,COLORYELLOW;
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'入',COLORRED;
S:=IF(卖1>0,HIGH*1.01,NULL),CROSSDOT,LINETHICK3,COLORGREEN;
DRAWTEXT(卖1>0,HIGH*1.02,'出',COLORGREEN;
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
BOL1L:MA(CLOSE,N),LINETHICK2,COLORWHITE;
UB:BOL1L+2*STD(CLOSE,N),LINETHICK2,COLORYELLOW;
LB:BOL1L-2*STD(CLOSE,N),LINETHICK2,COLORMAGENTA;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:=EMA(VAR7,5)*2, COLORFF00FF;
D:=EMA(K,5), COLORWHITE;
J:=K*3-D*2, COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;
HS:=VOL/CAPITAL*100, COLORGREEN;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'金进场',LINETHICK1,COLORFF00FF;
VAR1A:=IF(VARE>0,VARE,0);
VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
DRAWTEXT(VAR1C AND COUNT(VAR1C,30)=1,LOW*0.95,'nbsp; ', COLORWHITE;
量能突破:=SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),VOL,-VOL)),0);
ZJ1953:=ZIGZAG(C,15,1);
粉丝:=MA(ZJ1953,3);
DRAWTEXT(CROSS(ZJ1953,粉丝),LOW*1.025,'基金入场 ',COLORMAGENTA;
DRAWTEXT(CROSS(粉丝,ZJ1953),HIGH*0.988,'基金清仓 ',COLORFFFFFF;
阻力价:HHV(HIGH,19),COLORGREEN,LINETHICK1,NODRAW;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
主力成本线:EMA(X,13),COLORMAGENTA,NODRAW;
UR:=2;
LR:=4;
TC1:=IF(H=HHV(H,8*UR),H,NULL);
TC2:=REFX1(BARSLAST(TC1=H),10000)+1;
UPPER:=REFX1(IF(TC2=1,H,REF(H,TC2-1)),10000);
BC1:=IF(L=LLV(L,8*LR),L,NULL);
BC2:=REFX1(BARSLAST(BC1=L),10000)+1;
LOWER:=REFX1(IF(BC2=1,L,REF(L,BC2-1)),10000);
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;
{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;
{高点定位}
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));
{用时}
LR1:=FORCAST(C,NOD+1);
NP:=IF(CURRBARSCOUNT<=MAX(BC2,TC2),REFX1(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1)),10000),NULL),POINTDOT,COLOR93BDA8,NODRAW;
{近点}{隐藏}
LR2:=SLOPE(C,NOD+1);
LR3:=REFX1(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)),10000);
FP:=NP-LR3*(NOD),POINTDOT,COLOR93BDA8,NODRAW;
EQU:=(NP+FP)/2,POINTDOT,COLOR93BDA8,NODRAW;
AD:=ABS(NP-FP);
DBL:=BARSLAST(NOT(ISNULL(BC1)) )+1;
DBH:=BARSLAST(NOT(ISNULL(TC1)) )+1;
BSP:=IF(BC2>TC2,DBL,DBH)-1;
LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);
AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
AT3:=REFX1(BARSLAST(AT1-LRL=AT2),10000);
AT4:=REFX1(IF(AT3=0,H,REF(H,AT3)),10000);
AT5:=REFX1(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)),10000);
ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);
UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
UT3:=REFX1(BARSLAST(LRL-UT1=UT2),10000);
UT4:=REFX1(IF(UT3=0,H,REF(H,UT3)),10000);
UT5:=REFX1(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)),10000);
UTL:=LRL-UT5;
RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,REFX1(REF(ATL,MIN(BC2,TC2)-11),10000));
RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,REFX1(REF(UTL,MIN(BC2,TC2)-11),10000));
中轨:IF(NP>FP,IF(LRL<=RH,LRL,NULL),IF(LRL>=RL,LRL,NULL)),COLOR666666,LINETHICK2;
上轨:IF(NP>FP,IF(ATL<=RH,ATL,NULL),IF(ATL>=RL,ATL,NULL)),COLOR666666,LINETHICK2;
下轨:IF(NP>FP,IF(UTL<=RH,UTL,NULL),IF(UTL>=RL,UTL,NULL)),COLOR666666,LINETHICK2;
VAR1:=(C+H+O+L)/4;
顶阴影线:=MA(VAR1,20)*(1+1/8),COLORGREEN,LINETHICK1;
DRAWTEXT(CROSS(HIGH,顶阴影线),HIGH*0.990,'逃',COLORGREEN;
局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);
局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);
局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);
局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);
局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);
缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));
距前高天:=BARSLAST(局部高点预选C=1);
距前低天:=BARSLAST(局部低点预选C=-1);
小值周期:=LLVBARS(L,20);
大值周期:=HHVBARS(H,20);
低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);
预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)<>1) OR REF(低保留S,距前低天)=0,1,0);
判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);
预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)<>1) OR REF(高保留,距前高天)=0,1,0);
判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);
低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);
预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)<>1) OR REF(低保留,距前低天A)=0,1,0);
判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);
高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);
预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)<>1) OR REF(高保留XA,距前高天A)=0,1,0);
判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);
低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);
低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);
预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)<>1) OR REF(低保留X,距前低天YA)=0,1,0);
判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);
高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);
预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)<>1) OR REF(高保留YXA,距前高天YA)=0,1,0);
判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);
低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);
低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));
极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);
局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,NULL)), CIRCLEDOT, COLORYELLOW;
DRAWLINE(极点保留=-1,局部极点,极点保留=1,局部极点,0),COLORRED;
DRAWLINE(极点保留=1,局部极点,极点保留=-1,局部极点,0),COLORYELLOW;
DD1:=BARSLAST(ABS(极点保留)<>1);
DRAWTEXT(极点保留=1,局部极点,'',COLORGREEN;
DRAWTEXT(极点保留=-1,局部极点,'',COLORRED;
JRH:=HHV(C,2);
JRL:=LLV(C,2);
YTSL:=(3*C+L+O+H)/6;
Z1D:=C>=REF(C,1);
Z1X:=C<=REF(C,1);
Z2D:=C>=REF(C,2);
Z2X:=C<=REF(C,2);
X1D2:=Z1X AND Z2D;
D1X2:=Z1D AND Z2X;
R1:=Z1D AND Z2D;
R2:=REF(R1,1) AND X1D2;
R3:=REF(R2,1) AND D1X2;
R4:=REF(R3,1) AND X1D2;
R5:=REF(R4,1) AND D1X2;
R6:=REF(R5,1) AND X1D2;
R7:=REF(R6,1) AND D1X2;
R8:=REF(R7,1) AND X1D2;
R9:=REF(R8,1) AND D1X2;
RA:=REF(R9,1) AND X1D2;
RB:=REF(RA,1) AND D1X2;
RC:=REF(RB,1) AND X1D2;
RD:=Z1X AND Z2X;
RE:=REF(RD,1) AND D1X2;
RF:=REF(RE,1) AND X1D2;
R10:=REF(RF,1) AND D1X2;
R11:=REF(R10,1) AND X1D2;
R12:=REF(R11,1) AND D1X2;
R13:=REF(R12,1) AND X1D2;
R14:=REF(R13,1) AND D1X2;
R15:=REF(R14,1) AND X1D2;
R16:=REF(R15,1) AND D1X2;
R17:=REF(R16,1) AND X1D2;
R18:=REF(R17,1) AND D1X2;
R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);
R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
红色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,COLOR0000FF,NODRAW;
离场:=IF(红色持股,JRL,NULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:REF(离场,1),COLORGREEN,NODRAW;
青色观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,COLORFFFF00,NODRAW;
进:=IF(青色观望,JRH,NULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:REF(明进场价,1),COLORRED,NODRAW;
短买:R19,COLORRED,NODRAW;
STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;
QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2,POINTDOT,COLORGREEN,LINETHICK4;
TT:=240/FROMOPEN;
比:=TT;
J12:=(HIGH - ((HIGH - LOW) / 3));
J23:=(LOW + ((HIGH - LOW) / 3));
AAA:=REFX1(HHV(H,90),10000);
BBB:=REFX1(LLV(L,100),10000);
升:=EMA(C,2),COLOR000000;
降:=EMA(SLOPE(C,12)*20+C,30),COLOR000000;
买:=CROSS(升,降);
卖:=CROSS(降,升);
BUY1:=ZIGZAG(C,10,1);
SELL1:=MA(BUY1,2);
DRAWICON(CROSS(BUY1,SELL1),L-0.3,7);
DRAWICON(CROSS(SELL1,BUY1),H+0.2,8);
PL5:=ZIGZAG(C,5,1);
EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);
EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);
PL10:=ZIGZAG(C,10,1);
EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);
EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);
PL20:=ZIGZAG(C,20,1);
EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);
EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,LOW*0.97,'ⅠA)',COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,HIGH*1.03,'ⅡB)',COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,LOW*0.97,'ⅢC全仓)',COLORFFFF00;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,HIGH*1.02,'-----⑴空',COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,LOW*0.98,'++⑵全仓多',COLOR0000FF;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,HIGH*1.02,'空',COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,LOW*0.98,'全仓多',COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'顶',COLOR0000FF;
DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'A】多',COLOR00FF00;
DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.05,'B】空',COLOR00FF00;
DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'C】全仓多',COLOR00FF00;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'空进',COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.96,'多全仓',COLOR00FFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'空',COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.96,'多补',COLOR00FFFF;
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容