资源描述:
《【股票指标公式下载】-【通达信】中枢缠绵(黄金线、涨.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、【通达信】中枢缠绵(黄金线、涨停)-指标公式源码{N1:1,100,10;N2:1,100,10;DISP:=1,3,2};MA5:EMA(C,5),POINTDOT;MA10:MA(C,10),COLORYELLOW,LINETHICK2,POINTDOT;黄金线:(EMA(C,18)),COLORYELLOW;黄金线1:(EMA(C,15)),COLOR0000FF;MA60:MA(C,60),COLORRED,POINTDOT;MA90:MA(CLOSE,90),COLORD89837,POINTDOT;N1:=10;N2:=10;DI
2、SP:=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:=PEA
3、KBARS(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>T1ANDP2>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))ORZD=REF(ZD
4、,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))&&ZD5、TJ5ORTJ6ORTJ7);ZSD:=IF(TJ8,ZD,DRAWNULL);ZSG:=IF(TJ8,ZG,DRAWNULL);ZSH:=IF(TJ8,HH,DRAWNULL);ZSL:=IF(TJ8,LL,DRAWNULL);STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;DRAWTEXT(DISP=2,ZSH,'中枢'),COLORRED;中枢高:PLOYLINE(DISP=2,REF(ZSD,BA
6、RSLAST(TJ8))),CROSSDOT,COLORLIRED;中枢低:PLOYLINE(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORLIGREEN;中枢最高:PLOYLINE(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED;中枢最低:PLOYLINE(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN;局部低点预选A:=BACKSET(LLV(L,5)7、部低点预选B:=BACKSET(局部低点预选A=0ANDREF(局部低点预选A,1)=1,2);局部低点预选C:=IF(局部低点预选B=1ANDREF(局部低点预选B,1)=0,-1,0);局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);局部高点预选B:=BACKSET(局部高点预选A=0ANDREF(局部高点预选A,1)=1,2);局部高点预选C:=IF(局部高点预选B=1ANDREF(局部高点预选B,1)=0,1,0);缺口判断:=IF(L>REF(H,1),1,IF(H8、0));距前高天:=BARSLAST(局部高点预选C=1);距前低天:=BARSLAST(局部低点预选C=-1);小值周期:=LOWRANGE(L);大值周期:=T