通达信缠论结构主图指标公式

2019-05-30    作者:股匠网整理    来源:本站整理

{N1:110010;N2:110010;DISP:=132};
N1:=10;N2:=10;DISP:=2;
K:=IF(PERIOD=51{日}
IF(PERIOD=61{周}
IF(PERIOD=71{月}
IF(PERIOD=81{多分钟}
IF(PERIOD=91{多日}
IF(PERIOD=101{季}
IF(PERIOD=112{年}
IF(PERIOD=41{60F}
IF(PERIOD=31{30F}
IF(PERIOD=21{15F}
IF(PERIOD=11{5F}1{1F})))))))))))/10;
P1:=PEAK(1K*N11);
P2:=PEAK(1K*N12);
WP1:=PEAKBARS(1K*N11);
WP2:=PEAKBARS(1K*N12);
T1:=TROUGH(2K*N21);
T2:=TROUGH(2K*N22);
WT1:=TROUGHBARS(2K*N21);
WT2:=TROUGHBARS(2K*N22);
TJ1:=P1>T1 AND P2>T2 ;
ZD:=MAX(T1T2);
ZG:=MIN(P1P2);
LL:=MIN(T1T2);
HH:=MAX(P1P2);
TJ2:=FILTER(ZG>ZD2);
TJ3:=ZG=REF(ZGBARSLAST(TJ2)) OR ZD=REF(ZDBARSLAST(TJ2));
TJ4:=TJ1&&TJ2&&NOT(TJ3);
TJ5:=BETWEEN(ZDREF(ZDREF(BARSLAST(TJ4)1))REF(ZGREF(BARSLAST(TJ4)1)));
TJ6:=BETWEEN(ZGREF(ZDREF(BARSLAST(TJ4)1))REF(ZGREF(BARSLAST(TJ4)1)));
TJ7:=ZG>REF(ZGREF(BARSLAST(TJ4)1))&&ZD<REF(ZDREF(BARSLAST(TJ4)1));
TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8ZDDRAWNULL);
ZSG:=IF(TJ8ZGDRAWNULL);
ZSH:=IF(TJ8HHDRAWNULL);
ZSL:=IF(TJ8LLDRAWNULL);
STICKLINE(TJ8ZSHZSL0-1)COLORMAGENTA;
STICKLINE(TJ8ZSDZSGIF(DISP=130)1)COLORMAGENTA;
DRAWTEXT(DISP=2ZSH'中枢')COLORRED;
中枢高:PLOYLINE(DISP=2REF(ZSDBARSLAST(TJ8)))CROSSDOTCOLORLIRED;
中枢低:PLOYLINE(DISP=2REF(ZSGBARSLAST(TJ8)))CROSSDOTCOLORLIGREEN;
中枢最高:PLOYLINE(DISP=2REF(ZSHBARSLAST(TJ8)))POINTDOTCOLORRED;
中枢最低:PLOYLINE(DISP=2REF(ZSLBARSLAST(TJ8)))POINTDOTCOLORGREEN;
趋势高:PLOYLINE(DISP=3ZIG(1K*N1))COLORLIBLUE;
趋势低:PLOYLINE(DISP=3ZIG(2K*N2))COLORLIBLUE;
局部低点预选A:=BACKSET(LLV(L5)<REF(LLV(L4)1)4);
局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A1)=12);
局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B1)=0-10);
局部高点预选A:=BACKSET(HHV(H5)>REF(HHV(H4)1)4);
局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A1)=12);
局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B1)=010);
缺口判断:=IF(L>REF(H1)1IF(H<REF(L1)-10));
距前高天:=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)-10);
低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天1)<=REF(距前低天1) AND (距前高天>=4 OR LLV(缺口判断距前高天)=-1 OR LLV(L距前低天+2)<REF(LLV(L距前低天+1)1))-10);
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H距前高天+1)-10);
预判:=IF((距前低天<4 AND HHV(缺口判断距前低天)!=1) OR REF(低保留S距前低天)=010);
判断:=IF(局部高点预选C=1 AND REF(距前低天1)<=REF(距前高天1) AND 预判=1 AND 大值周期>REF(小值周期距前低天+1) AND 大值周期>REF(小值周期距前低天) AND 大值周期>REF(大值周期距前高天)10);
高保留A:=IF(局部高点预选C=1 AND REF(距前低天1)>REF(距前高天1) AND HHV(H距前低天+1)>REF(HHV(H距前低天+1)1)10);
高保留B:=IF(局部高点预选C=1 AND REF(距前低天1)<=REF(距前高天1) AND REF(低保留S距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断距前低天)=1)10);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L距前低天+1)10);
预判A:=IF((距前高天<4 AND HHV(缺口判断距前高天)!=1) OR REF(高保留距前高天)=010);
判断A:=IF(局部低点预选C=-1 AND REF(距前高天1)<=REF(距前低天1) AND 预判A=1 AND 小值周期>REF(大值周期距前高天+1) AND 小值周期>REF(大值周期距前高天) AND 小值周期>REF(小值周期距前低天)-10);
低保留A:=IF(局部低点预选C=-1 AND REF(距前高天1)>REF(距前低天1) AND LLV(L距前高天+1)<REF(LLV(L距前高天+1)1)-10);
低保留B:=IF(局部低点预选C=-1 AND REF(距前高天1)<=REF(距前低天1) AND (距前高天>=4 OR LLV(缺口判断距前高天)=-1 OR 判断A=-1)-10);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H距前高天+1)-10);
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);
预判X:=IF((距前低天A<4 AND HHV(缺口判断距前低天A)!=1) OR REF(低保留距前低天A)=010);
判断X:=IF(局部高点预选C=1 AND REF(距前低天A1)<=REF(距前高天A1) AND 预判X=1 AND 大值周期>REF(小值周期距前低天A+1) AND 大值周期>REF(小值周期距前低天A) AND 大值周期>REF(大值周期距前高天A)10);
高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A1)>REF(距前高天A1) AND HHV(H距前低天A+1)>REF(HHV(H距前低天A+1)1)10);
高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A1)<=REF(距前高天A1) AND REF(低保留距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断距前低天A)=1)10);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L距前低天A+1)10);
预判XA:=IF((距前高天A<4 AND HHV(缺口判断距前高天A)!=1) OR REF(高保留XA距前高天A)=010);
判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A1)<=REF(距前低天A1) AND 预判XA=1 AND 小值周期>REF(大值周期距前高天A+1) AND 小值周期>REF(大值周期距前高天A) AND 小值周期>REF(小值周期距前低天A)-10);
低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A1)>REF(距前低天A1) AND LLV(L距前高天A+1)<REF(LLV(L距前高天A+1)1)-10);
低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A1)<=REF(距前低天A1) AND (距前高天A>=4 OR LLV(缺口判断距前高天A)=-1 OR 判断XA=-1)-10);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H距前高天A+1)-10);
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);
预判YX:=IF((距前低天YA<4 AND HHV(缺口判断距前低天YA)!=1) OR REF(低保留X距前低天YA)=010);
判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA1)<=REF(距前高天YA1) AND 预判YX=1 AND 大值周期>REF(小值周期距前低天YA+1) AND 大值周期>REF(小值周期距前低天YA) AND 大值周期>REF(大值周期距前高天YA)10);
高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA1)>REF(距前高天YA1) AND HHV(H距前低天YA+1)>REF(HHV(H距前低天YA+1)1)10);
高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA1)<=REF(距前高天YA1) AND REF(低保留X距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断距前低天YA)=1)10);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L距前低天YA+1)10);
预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断距前高天YA)!=1) OR REF(高保留YXA距前高天YA)=010);
判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA1)<=REF(距前低天YA1) AND 预判YXA=1 AND 小值周期>REF(大值周期距前高天YA+1) AND 小值周期>REF(大值周期距前高天YA) AND 小值周期>REF(小值周期距前低天YA)-10);
低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA1)>REF(距前低天YA1) AND LLV(L距前高天YA+1)<REF(LLV(L距前高天YA+1)1)-10);
低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA1)<=REF(距前低天YA1) AND (距前高天YA>=4 OR LLV(缺口判断距前高天YA)=-1 OR 判断YXA=-1)-10);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H距前高天YA+1)-10);
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(HREF(距前高天YA1)+2)1IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(LREF(距前低天YA1)+2)-10));
极点保留:=IF(AAAD=0高保留YX+低保留YXAAAD);
XA:=DRAWLINE(极点保留=-1LREF(极点保留1)=-1REF(L1)1);
XB:=DRAWLINE(极点保留=1HREF(极点保留1)=1REF(H1)1);
XAS:=DRAWLINE(极点保留=-1XBREF(极点保留1)=-1REF(XB1)1);
XBS:=DRAWLINE(极点保留=1XAREF(极点保留1)=1REF(XA1)1);
XA45:=(XA+XAS)/2; XB45:=(XB+XBS)/2;
XA63:=(XAS-XA)*3/4+XA; XB63:=XB-(XB-XBS)*3/4;
压1:IF(BETWEEN(XA45XB45XB63)XA45DRAWNULL)COLOR008800;
压2:IF(BETWEEN(XA63XB45XB63)XA63DRAWNULL)COLOR008800;
局部极点:IF(极点保留=-1LIF(极点保留=1HDRAWNULL))CIRCLEDOTCOLORYELLOWLINETHICK3;
DRAWLINE(极点保留=-1局部极点极点保留=1局部极点0)COLORLIRED;
DRAWLINE(极点保留=1局部极点极点保留=-1局部极点0)COLORYELLOW;
DD1:=BARSLAST(ABS(极点保留)!=1);
DRAWTEXT(极点保留=1局部极点'卖')COLORGREEN;
DRAWTEXT(极点保留=-1局部极点'买')COLORRED;
DRAWKLINE(HIGHOPENLOWCLOSE);
MA5:MA(CLOSE5)COLORFF00FFLINETHICK1;
判:IF(MA5<REF(MA51)MA5DRAWNULL)COLORWHITELINETHICK1;
MA10:MA(CLOSE10)COLORYELLOWLINETHICK1;
判吻型:IF(MA5>MA10MA10DRAWNULL)COLORREDLINETHICK1;
{笔底分型 选股 预警 确保向下笔成立后的底分型}
V00:= HIGH<REF(HIGH1) AND LOW<REF(LOW1);
V01:= HIGH<REF(HIGH1) AND LOW>REF(LOW1);
V02:= HIGH>REF(HIGH1) AND LOW<REF(LOW1);
V03:= HIGH>REF(HIGH1) AND LOW>REF(LOW1);
V04:= REF(HIGH2) < HIGH AND REF(LOW2) < LOW
AND REF(HIGH2) > REF(HIGH1) AND REF(LOW2) < REF(LOW1);
V1:= COUNT(V006)>=3 AND COUNT(V01 OR V025)=0 AND LLVBARS(LOW6) = 1 AND HHVBARS(HIGH6) >= 5 AND V03;
V2:= COUNT(V007)>=3 AND COUNT(V01 OR V026)=1 AND LLVBARS(LOW7) = 2 AND HHVBARS(HIGH7) >= 6 AND V04;
V3:= COUNT(V007)>=3 AND COUNT(V01 OR V026)=1 AND LLVBARS(LOW7) = 1 AND HHVBARS(HIGH7) >= 6 AND V03;
V4:= COUNT(V008)>=3 AND COUNT(V01 OR V027)<=2 AND LLVBARS(LOW8) = 2 AND HHVBARS(HIGH8) >= 7 AND V04;
V5:= COUNT(V008)>=3 AND COUNT(V01 OR V027)<=2 AND LLVBARS(LOW8) = 1 AND HHVBARS(HIGH8) >= 7 AND V03;
V6:= COUNT(V009)>=3 AND COUNT(V01 OR V028)<=3 AND LLVBARS(LOW9) = 2 AND HHVBARS(HIGH9) >= 8 AND V04;
V7:= COUNT(V009)>=3 AND COUNT(V01 OR V028)<=3 AND LLVBARS(LOW9) = 1 AND HHVBARS(HIGH9) >= 8 AND V03;
V8:= COUNT(V0010)>=3 AND COUNT(V01 OR V029)<=4 AND LLVBARS(LOW10) = 2 AND HHVBARS(HIGH10) >= 9 AND V04;
V9:= COUNT(V0010)>=3 AND COUNT(V01 OR V029)<=4 AND LLVBARS(LOW10) = 1 AND HHVBARS(HIGH10) >= 9 AND V03;
V10:= COUNT(V0011)>=3 AND COUNT(V01 OR V0210)<=5 AND LLVBARS(LOW11) = 2 AND HHVBARS(HIGH11) >= 10 AND V04;
XG:= V1 OR V2 OR V3 OR V4 OR V5 OR V6 OR V7 OR V8 OR V9 OR V10;
DRAWTEXT(FILTER(XG=15)L*0.998'底')COLORYELLOW;
{笔顶分型 选股 预警 确保向上笔成立后的顶分型}
HV00:= HIGH>REF(HIGH1) AND LOW>REF(LOW1);
HV01:= HIGH<REF(HIGH1) AND LOW>REF(LOW1);
HV02:= HIGH>REF(HIGH1) AND LOW<REF(LOW1);
HV03:= HIGH<REF(HIGH1) AND LOW<REF(LOW1);
HV04:= REF(HIGH2) > HIGH AND REF(LOW2) > LOW AND REF(HIGH2) > REF(HIGH1) AND REF(LOW2) < REF(LOW1);
HV1:= COUNT(HV006)>=3 AND COUNT(HV01 OR HV025)=0 AND HHVBARS(HIGH6) = 1 AND LLVBARS(LOW6) >= 5 AND HV03;
HV2:= COUNT(HV007)>=3 AND COUNT(HV01 OR HV026)=1 AND HHVBARS(HIGH7) = 2 AND LLVBARS(LOW7) >= 6 AND HV04;
HV3:= COUNT(HV007)>=3 AND COUNT(HV01 OR HV026)=1 AND HHVBARS(HIGH7) = 1 AND LLVBARS(LOW7) >= 6 AND HV03;
HV4:= COUNT(HV008)>=3 AND COUNT(HV01 OR HV027)<=2 AND HHVBARS(HIGH8) = 2 AND LLVBARS(LOW8) >= 7 AND HV04;
HV5:= COUNT(HV008)>=3 AND COUNT(HV01 OR HV027)<=2 AND HHVBARS(HIGH8) = 1 AND LLVBARS(LOW8) >= 7 AND HV03;
HV6:= COUNT(HV009)>=3 AND COUNT(HV01 OR HV028)<=3 AND HHVBARS(HIGH9) = 2 AND LLVBARS(LOW9) >= 8 AND HV04;
HV7:= COUNT(HV009)>=3 AND COUNT(HV01 OR HV028)<=3 AND HHVBARS(HIGH9) = 1 AND LLVBARS(LOW9) >= 8 AND HV03;
HV8:= COUNT(HV0010)>=3 AND COUNT(HV01 OR HV029)<=4 AND HHVBARS(HIGH10) = 2 AND LLVBARS(LOW10) >= 9 AND HV04;
HV9:= COUNT(HV0010)>=3 AND COUNT(HV01 OR HV029)<=4 AND HHVBARS(HIGH10) = 1 AND LLVBARS(LOW10) >= 9 AND HV03;
HV10:= COUNT(HV0011)>=3 AND COUNT(HV01 OR HV0210)<=5 AND HHVBARS(HIGH11) = 2 AND LLVBARS(LOW11) >= 10 AND HV04;
HXG:=HV1 OR HV2 OR HV3 OR HV4 OR HV5 OR HV6 OR HV7 OR HV8 OR HV9 OR HV10;
DRAWTEXT(FILTER(HXG=13)H*1.01'顶')COLORGREEN;

阅读:437    评论:0

联系我们 - 关于我们 - 网站地图

声明:站内所有文章、公式均来自互联网或网友分享提供,如侵犯您的权利请告知,我们会在24小时内及时删除! 


【电脑版】  【回到顶部】