最新缠中说禅中枢和笔公式通达信版
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
{通达信MA+中枢+分笔公式} {M1,M2参数自己定,可选5,10} MA1:MA(CLOSE,5); MA2:MA(CLOSE,10); {N1:1,100,10;N2:1,100,10;DISP:=1,3,2}; N1:=10;N2:=10;DISP:=2; K:=IF(PERIOD=5,1,{日} IF(PERIOD=6,1,{周} IF(PERIOD=7,1,{月} IF(PERIOD=8,1,{多分钟} IF(PERIOD=9,1,{多日} IF(PERIOD=10,1,{季} IF(PERIOD=11,2,{年} IF(PERIOD=4,1,{60F} IF(PERIOD=3,1,{30F} IF(PERIOD=2,1,{15F} IF(PERIOD=1,1{5F},1{1F})))))))))))/10; P1:=PEAK(1,K*N1,1); P2:=PEAK(1,K*N1,2); WP1:=PEAKBARS(1,K*N1,1); WP2:=PEAKBARS(1,K*N1,2); T1:=TROUGH(2,K*N2,1); T2:=TROUGH(2,K*N2,2); WT1:=TROUGHBARS(2,K*N2,1); WT2:=TROUGHBARS(2,K*N2,2); 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))&&ZDREF(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(HREF(距前低天,1) AND LLV(L,距前高天+1)=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)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)=4 OR LLV(缺口判断,距前高天)=-1 OR判断A=-1),-1,0);低保留:=IF((低保留A=-1 OR低保留B=-1) AND LREF(小值周期,距前低天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)=4 OR LLV(缺口判断,距前高天A)=-1 OR判断XA=-1),-1,0);低保留X:=IF((低保留XA=-1 OR低保留XB=-1) AND LREF(小值周期,距前低天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,0Leabharlann Baidu;高保留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)=4 OR LLV(缺口判断,距前高天YA)=-1 OR判断YXA=-1),-1,0);低保留YX:=IF((低保留YXA=-1 OR低保留YXB=-1) AND LREF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND低保留YX=-1 AND L