您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经知识>>正文内容

[求助]请帮通不过去!!! [文华财经]

  • 咨询内容:  VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;VAR3:=(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210;VAR4:=MA(VAR3,13);VAR5:=EMA(MA(CLOSE,3),34);VAR6:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;VAR7:=MA(VAR6,5);VAR8:=MA(VAR6,10);VAR9:=1/WINNER(CLOSE);VARA:=MA(CLOSE,13);VARB:=100-ABS((CLOSE-VARA)/VARA*100);VARC:=LLV(LOW,75);VARD:=HHV(HIGH,75);VARE:=(VARD-VARC)/100;VARF:=SMA((CLOSE-VARC)/VARE,20,1);VAR10:=SMA((OPEN-VARC)/VARE,20,1);VAR11:=3*VARF-2*SMA(VARF,15,1);VAR12:=3*VAR10-2*SMA(VAR10,15,1);VAR13:=100-VAR12;VAR14:=100-VAR11;VAR15:=MA(WINNER(CLOSE*0.95)*100,3);VAR16:=100-IF(VAR9>5,IF(VAR9<100,VAR9,VARB-10),0);VAR17:=VAR15>VARB;VAR18:=REF(LOW,1)*0.9;VAR19:=LOW*0.9;CAPITAL:=GETPRICE1('通股本';VAR1A:=(VAR19*VOL+VAR18*(CAPITAL-VOL))/CAPITAL;VAR1B:=EMA(VAR1A,30);VAR1C:=CLOSE-REF(CLOSE,1);VAR1D:=MAX(VAR1C,0);VAR1E:=ABS(VAR1C);VAR1F:=SMA(VAR1D,7,1)/SMA(VAR1E,7,1)*100;VAR20:=SMA(VAR1D,13,1)/SMA(VAR1E,13,1)*100;VAR21:=BARSCOUNT(CLOSE);VAR22:=SMA(MAX(VAR1C,0),6,1)/SMA(ABS(VAR1C),6,1)*100;VAR23:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;VAR24:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR25:=SMA((SMA(VAR24,4,1)-50)*2,3,1);INDEXL:="999001$L";INDEXC:="999001$C";INDEXH:="999001$H";VAR26:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;VAR27:=SMA(VAR26,4,1);VAR28:=SMA(VAR27,3,1);VAR29:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR2A:=VAR22<=25 AND VAR23<-95 AND VAR29>20 AND VAR25<-30 AND VAR28<30 AND VAR1B-CLOSE>=-0.25 AND VAR1F<22 AND VAR20<28 AND VAR21>50;VAR326:=IF(CLOSE>REF(CLOSE, 1),88,0);VAR327:=IF(CLOSE/REF(CLOSE, 1)>1.050 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0);STICKLINE(VAR327>90,L*0.99,L*0.95,4,0),COLORYELLOW;DRAWTEXT(VAR327>90,LOW*0.95,'涨',COLORYELLOW;DF:=(C-REF(C,1))/REF(C,1)*100<-5;AA:=BARSLAST(DF);突破箱体:=CROSS(C,REF(C,AA));中枢:TRENDLINES(DF,O,REF(DF,1),REF(O,1)),COLORMAGENTA ,LINETHICK2;箱底:LLV(MIN(L,REF(L,AA)),AA),COLORCYAN,LINETHICK2;DRAWTEXT(ISLASTBAR,中枢,'中枢';N1:=10;N2:=10;DISP:=2;K:=1; P1:=PEAK(C,K*N1,1,1);P2:=PEAK(C,K*N1,2,1);WP1:=PEAKBARS(C,K*N1,1,1);WP2:=PEAKBARS(C,K*N1,2,1);T1:=TROUGH(C,K*N2,1,1);T2:=TROUGH(C,K*N2,2,1);WT1:=TROUGHBARS(C,K*N2,1,1);WT2:=TROUGHBARS(C,K*N2,2,1);TJ1:=P1>T1 AND P2>T2 ;ZD:=MAX(T1,T2);ZG:=MIN(P1,P2);LL:=MIN(T1,T2);HH:=MAX(P1,P2);TJ2:=FILTER(ZG>ZD,2);TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));TJ4:=TJ1&&TJ2&&NOT(TJ3);TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1));TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);ZSD:=IF(TJ8,ZD,NULL);ZSG:=IF(TJ8,ZG,NULL);ZSH:=IF(TJ8,HH,NULL);ZSL:=IF(TJ8,LL,NULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,'枢',COLORRED;POLYLINE1(DISP=2,REF(ZSD,BARSLAST(TJ8))),CROSSDOT,COLORRED;POLYLINE1(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORGREEN;POLYLINE1(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;POLYLINE1(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;POLYLINE1(DISP=3,ZIGZAG(C,K*N1,1)),COLORBLUE;POLYLINE1(DISP=3,ZIGZAG(C,K*N2,1)),COLORBLUE;局部低点预选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);{萃富网-股票公式网站 WWW.CUIV.COM}缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LLVBARS(L,1);大值周期:=HHVBARS(H,1);低保留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;MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;判:IF(MA5<REF(MA5,1),MA5,NULL),COLORWHITE,LINETHICK2;

     

     来源:程序化99

  • 文华技术人员:  SL:=10;TP:=20;Y:=(H+L)/2;  AA:=REF((SMA(Y,5,1)),3); BB:=REF((SMA(Y,8,1)),5); CC:=REF((SMA(Y,13,1)),8); R2:=REF(BB,5);  KU1:=IFELSE(H=HHV(H,3),1,0); KD1:=IFELSE(L=LLV(LOW,3),1,0);  UL:=IFELSE(REF(KU1,2)=1 AND REF(KU1,1)=0 AND  KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0))); DL:=IFELSE(REF(KD1,2)=1 AND REF(KD1,1)=0 AND  KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0))); SHANG:IFELSE(HIGH>=R2,UL,REF(UL,BARSLAST(HIGH>R2))); XIA:IFELSE(LOW<=R2,DL,REF(DL,BARSLAST(LOW<=R2)));  C>SHANG AND REF(CLOSE,1)<REF(SHANG,1) AND ISLASTBPK=0 ,BPK; C<XIA AND REF(CLOSE,1)>REF(XIA,1) AND ISLASTSPK=0,SPK;AO:=SMA(Y,5,1)-SMA(Y,34,1);  AC:=SMA((AO-SMA(AO,5,1)),5,1);   AO>REF(AO,1) AND REF(AO,1)>REF(AO,2) AND AC>REF(AC,1) AND REF(AC,1)>REF(AC,2) AND C>REF(C,1) AND BKVOL<4 AND ISLASTBPK=1,BK;  AO<REF(AO,1) AND REF(AO,1)<REF(AO,2) AND AC<REF(AC,1) AND REF(AC,1)<REF(AC,2) AND C<REF(C,1) AND SKVOL<4 AND ISLASTSPK=1,SK;A:=MINPRICE;(((C<=BKPRICE-SL*A||C>=BKPRICE+TP*A)&&BKPRICE>0) OR (C>R2)) AND SKVOL>0,SP; (((C>=SKPRICE+SL*A||C<=SKPRICE-TP*A)&&SKPRICE>0) OR (C<R2)) AND BKVOL>0,BP;        AUTOFILTER;

     

     来源: WWW.CXH99.COM

  • 文华客服:  这两个指标模型,适用的软件不同
    第一个指标是看盘的指标,使用的趋势线数值的函数,该函数只能在看盘软件wh6中使用的,在wh6中语法检测是通过的
    第二个是用于程序化的模型,使用的信号记录函数,需要在专业的程序化软件wh8上使用的,在wh8中语法检测通过
    您根据自己的需求,选择合适的软件加载对应的指标

     

  • 网友回复:  一个第85行不能是变量

     

  • 网友回复:   VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6; VAR3:=(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210; VAR4:=MA(VAR3,13); VAR5:=EMA(MA(CLOSE,3),34); VAR6:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; VAR7:=MA(VAR6,5); VAR8:=MA(VAR6,10); VAR9:=1/WINNER(CLOSE); VARA:=MA(CLOSE,13); VARB:=100-ABS((CLOSE-VARA)/VARA*100); VARC:=LLV(LOW,75); VARD:=HHV(HIGH,75); VARE:=(VARD-VARC)/100; VARF:=SMA((CLOSE-VARC)/VARE,20,1); VAR10:=SMA((OPEN-VARC)/VARE,20,1); VAR11:=3*VARF-2*SMA(VARF,15,1); VAR12:=3*VAR10-2*SMA(VAR10,15,1); VAR13:=100-VAR12; VAR14:=100-VAR11; VAR15:=MA(WINNER(CLOSE*0.95)*100,3); VAR16:=100-IF(VAR9>5,IF(VAR9<100,VAR9,VARB-10),0); VAR17:=VAR15>VARB; VAR18:=REF(LOW,1)*0.9; VAR19:=LOW*0.9; CAPITAL:=GETPRICE1('通股本'; VAR1A:=(VAR19*VOL+VAR18*(CAPITAL-VOL))/CAPITAL; VAR1B:=EMA(VAR1A,30); VAR1C:=CLOSE-REF(CLOSE,1); VAR1D:=MAX(VAR1C,0); VAR1E:=ABS(VAR1C); VAR1F:=SMA(VAR1D,7,1)/SMA(VAR1E,7,1)*100; VAR20:=SMA(VAR1D,13,1)/SMA(VAR1E,13,1)*100; VAR21:=BARSCOUNT(CLOSE); VAR22:=SMA(MAX(VAR1C,0),6,1)/SMA(ABS(VAR1C),6,1)*100; VAR23:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; VAR24:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; VAR25:=SMA((SMA(VAR24,4,1)-50)*2,3,1); INDEXL:="999001$L"; INDEXC:="999001$C"; INDEXH:="999001$H"; VAR26:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; VAR27:=SMA(VAR26,4,1); VAR28:=SMA(VAR27,3,1); VAR29:=(HHV(HIGH,30)-CLOSE)/CLOSE*100; VAR2A:=VAR22<=25 AND VAR23<-95 AND VAR29>20 AND VAR25<-30 AND VAR28<30 AND VAR1B-CLOSE>=-0.25 AND VAR1F<22 AND VAR20<28 AND VAR21>50; VAR326:=IF(CLOSE>REF(CLOSE, 1),88,0); VAR327:=IF(CLOSE/REF(CLOSE, 1)>1.050 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0); STICKLINE(VAR327>90,L*0.99,L*0.95,4,0),COLORYELLOW; DRAWTEXT(VAR327>90,LOW*0.95,'涨',COLORYELLOW; DF:=(C-REF(C,1))/REF(C,1)*100<-5; AA:=BARSLAST(DF); 突破箱体:=CROSS(C,REF(C,AA)); 中枢:TRENDLINES(DF,O,REF(DF,1),REF(O,1)),COLORMAGENTA ,LINETHICK2; 箱底:LLV(MIN(L,REF(L,AA)),AA),COLORCYAN,LINETHICK2; DRAWTEXT(ISLASTBAR,中枢,'中枢'; DISP:=2; P1:=PEAK(C,10,1,1); P2:=PEAK(C,10,2,1); WP1:=PEAKBARS(C,10,1,1); WP2:=PEAKBARS(C,10,2,1); T1:=TROUGH(C,10,1,1); T2:=TROUGH(C,10,2,1); WT1:=TROUGHBARS(C,10,1,1); WT2:=TROUGHBARS(C,10,2,1); TJ1:=P1>T1 AND P2>T2 ; ZD:=MAX(T1,T2); ZG:=MIN(P1,P2); LL:=MIN(T1,T2); HH:=MAX(P1,P2); TJ2:=FILTER(ZG>ZD,2); TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2)); TJ4:=TJ1&&TJ2&&NOT(TJ3); TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1))); TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1))); TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1)); TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7); ZSD:=IF(TJ8,ZD,NULL); ZSG:=IF(TJ8,ZG,NULL); ZSH:=IF(TJ8,HH,NULL); ZSL:=IF(TJ8,LL,NULL); STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA; STICKLINE(TJ8,ZSD,ZSG,3,1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'枢',COLORRED; POLYLINE1(DISP=2,REF(ZSD,BARSLAST(TJ8))),CROSSDOT,COLORRED; POLYLINE1(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORGREEN; POLYLINE1(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED; POLYLINE1(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN; POLYLINE1(DISP=3,ZIGZAG(C,10,1)),COLORBLUE; POLYLINE1(DISP=3,ZIGZAG(C,10,1)),COLORBLUE; 局部低点预选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,1); 大值周期:=HHVBARS(H,1); 低保留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; MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2; 判:IF(MA5<REF(MA5,1),MA5,NULL),COLORWHITE,LINETHICK2;

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容