公式指标平台 股票指标公式源码分享 登录 注册
公式指标平台
未来函数检测
首 页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 操盘手公式 东财通公式 飞狐公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式指标平台 > 通达信公式 > 正文 → 正文

通达信支撑压力和加仓逃顶指标源码

发布时间:2012/10/17 0:17:04  浏览次数:

通达信支撑压力和加仓逃顶指标源码

该指标为通达信指标,实线为近期最大量对应收盘价所画横线,为支撑或压力,原理是成交密集区;虚线根据三天法则画的横线,三天站稳不破为支撑压力;曲线也是支撑压力,为轨道线。底背离加仓,顶背离逃顶。很有实用价值,也很准。
一般大的支撑压力看日线,小的看60分钟线

N250:=250;
PT250:=CONST(HHVBARS(V,N250));
T250:IF(CURRBARSCOUNT<=N250,CONST(IF(PT250=0,C,REF(C,PT250))),DRAWNULL),COLOR990000,LINETHICK2;
IF(CURRBARSCOUNT=PT250+1,T250*1.01,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N250,T250,'250'),COLOR990000;
N120:=120;
PT120:=CONST(HHVBARS(V,N120));
T120:IF(CURRBARSCOUNT<=N120,CONST(IF(PT120=0,C,REF(C,PT120))),DRAWNULL),COLORAAAA00,LINETHICK2;
IF(CURRBARSCOUNT=PT120+1,T120,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N120,T120,'120'),COLORAAAA00;
N60:=60;
PT60:=CONST(HHVBARS(V,N60));
T60:IF(CURRBARSCOUNT<=N60,CONST(IF(PT60=0,C,REF(C,PT60))),DRAWNULL),COLOR00BB00,LINETHICK2;
IF(CURRBARSCOUNT=PT60+1,T60,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N60,T60,'60'),COLOR00BB00;
N30:=30;
PT30:=CONST(HHVBARS(V,N30));
T30:IF(CURRBARSCOUNT<=N30,CONST(IF(PT30=0,C,REF(C,PT30))),DRAWNULL),COLOR0000CC,LINETHICK2;
IF(CURRBARSCOUNT=PT30+1,T30,DRAWNULL)CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N30,T30,'30'),COLOR0000CC;
N20:=20;
PT20:=CONST(HHVBARS(V,N20));
T20:IF(CURRBARSCOUNT<=N20,CONST(IF(PT20=0,C,REF(C,PT20))),DRAWNULL),COLORDD00DD,LINETHICK2;
IF(CURRBARSCOUNT=PT20+1,T20,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N20,T20,'20'),COLORDD00DD;
N10:=10;
PT10:=CONST(HHVBARS(V,N10));
T10:IF(CURRBARSCOUNT<=N10,CONST(IF(PT10=0,C,REF(C,PT10))),DRAWNULL),COLOR00EEEE,LINETHICK2;
IF(CURRBARSCOUNT=PT10+1,T10,DRAWNULL)CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N10,T10,'10'),COLOR00EEEE;
N5:=5;
PT5:=CONST(HHVBARS(V,N5));
T5:IF(CURRBARSCOUNT<=N5,CONST(IF(PT5=0,C,REF(C,PT5))),DRAWNULL),COLORFFFFFF,LINETHICK2;
IF(CURRBARSCOUNT=PT5+1,T5,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N5,T5,'5'),COLORFFFFFF;
DRAWKLINE(H,O,L,C);

VAR3:=(C+H+O+L)/4;
买入:=XMA(VAR3,32)*(1-100/1000);
低吸线:买入,COLORFF937F,LINETHICK2;
卖出:=XMA(VAR3,20)*(1+80/1000);
高抛线:卖出,COLORWHITE,LINETHICK2;

{买:CROSS(买入,LOW),NODRAW;
卖:CROSS(HIGH,卖出),NODRAW;}
MA1:=MA(VAR3,3);

DRAWICON(CROSS(买入,LOW),LOW*0.95,11);
DRAWICON(CROSS(HIGH,卖出),HIGH*1.02,12);
 

G:=5;
AAB:=REF(H,G)=HHV(H,2*G+1); AAB1:=REF(L,G)=LLV(L,2*G+1);
QYB:=BACKSET(AAB,G+1); QYB1:=BACKSET(AAB1,G+1);
CCB:=FILTER(QYB,G) AND H=HHV(H,G+1); CCB1:=FILTER(QYB1,G) AND L=LLV(L,G+1);
DDDB:=BARSLAST(CCB); DDB1:=BARSLAST(CCB1);
GDTSB:=IF(CCB,CURRBARSCOUNT,0); DDTSB:=IF(CCB1,CURRBARSCOUNT,0);
DINGBUTSB:=IF(DDDB,REF(GDTSB,DDDB),GDTSB); DDTSB1:=IF(DDB1,REF(DDTSB,DDB1),DDTSB);
GDCSB1:=CONST(DINGBUTSB); DDCSB1:=CONST(DDTSB1);
GDCS13:=CONST(REF(HIGH,GDCSB1-1)); DDCS13:=CONST(REF(L,DDCSB1-1));
DINGBUTSB1:=REF(DINGBUTSB,DDDB+1); DDTSB2:=REF(DDTSB1,DDB1+1);
GDCSB2:=CONST(DINGBUTSB1); DDCSB2:=CONST(DDTSB2);
GDCS23:=CONST(REF(HIGH,DINGBUTSB1-1)); DDCS23:=CONST(REF(L,DDTSB2-1));
XG1:=BACKSET(ISLASTBAR,GDCSB1); XD1:=BACKSET(ISLASTBAR,DDCSB1);
XG2:=BACKSET(ISLASTBAR,DINGBUTSB1); XD2:=BACKSET(ISLASTBAR,DDTSB2);
XDD:=IF(DDCS13<=DDCS23,XD1,XD2);
M:=INTPART(3*G/5);
AAAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0);
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);
GDCS11:=CONST(DINGBUTSS);
DINGBUTS11:=REF(DINGBUTSS,DDDD+1);
GDCS22:=CONST(DINGBUTS11);
AA11:=REF(L,M)=LLV(L,2*M+1);
QY11:=BACKSET(AA11,M+1);
CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
HH1:= REF(H,GDCSB1-1),NODRAW;
HH2:= REF(H,GDCSB2-1),NODRAW;
HH11:= REF(H,GDCS11-1),NODRAW;
HH22:= REF(H,GDCS22-1),NODRAW;
GHH1:=MAX(MAX(REF(H,GDCSB1-1),REF(H,GDCSB2-1)),MAX(REF(H,GDCS11-1),REF(H,GDCS22-1))),NODRAW;
DLL1:=MIN(MIN(REF(L,DDCSB1-1),REF(L,DDCSB2-1)),MIN(REF(L,DDCS11-1),REF(L,DDCS22-1))),NODRAW;
GHH:=MAX(GHH1,HHV(H,10));
DLL:=MIN(DLL1,LLV(L,10));
DX1:=(REF(H,GDCSB1-1)-REF(H,GDCSB2-1))/(GDCSB2-GDCSB1),NODRAW;
DX2:=(REF(H,GDCS11-1)-REF(H,GDCS22-1))/(GDCS22-GDCS11),NODRAW;
GGAA:=DX1>0 AND (REF(H,(GDCSB1-1))+DX1*GDCSB1)>GHH*1.05,NODRAW;
GGAB:=DX1<0 AND (REF(H,(GDCSB1-1))+DX1*GDCSB1)<DLL*0.95,NODRAW;
DDX1:=IF(GGAA OR GGAB,0,1),NODRAW;
GGBA:=DX2>0 AND (REF(H,(GDCS11-1))+DX2*GDCS11)>GHH*1.05,NODRAW;
GGBB:=DX2<0 AND (REF(H,(GDCS11-1))+DX2*GDCS11)<DLL*0.95,NODRAW;
DDDX1:=IF(GGBA OR GGBB,0,1),NODRAW;
LX1:=(REF(L,DDCSB1-1)-REF(L,DDCSB2-1))/(DDCSB2-DDCSB1),NODRAW;
LX2:=(REF(L,DDCS11-1)-REF(L,DDCS22-1))/(DDCS22-DDCS11),NODRAW;
DDAA:=LX1<0 AND (REF(L,(DDCSB1-1))+LX1*DDCSB1)<DLL*0.95,NODRAW;
DDAB:=LX1>0 AND (REF(L,(DDCSB1-1))+LX1*DDCSB1)>GHH*1.05,NODRAW;
LLX1:=IF(DDAA OR DDAB,0,1);
DDBA:=LX2<0 AND (REF(L,(DDCS11-1))+LX2*DDCS11)<DLL*0.95,NODRAW;
DDBB:=LX2>0 AND (REF(L,(DDCS11-1))+LX2*DDCS11)>GHH*1.05,NODRAW;
LLLX1:=IF(DDBA OR DDBB,0,1),NODRAW;
高压力:DRAWLINE(CURRBARSCOUNT=GDCSB2,H,CURRBARSCOUNT=GDCSB1,H,DDX1),COLORABFF46,LINETHICK1;
低支撑:DRAWLINE(CURRBARSCOUNT=DDCSB2,L,CURRBARSCOUNT=DDCSB1,L,LLX1),COLORABFF46,LINETHICK1;
DRAWLINE(CURRBARSCOUNT=GDCS22 ,H,CURRBARSCOUNT=GDCS11,H,DDDX1),COLORRED,LINETHICK1;
DRAWLINE(CURRBARSCOUNT=DDCS22 ,L,CURRBARSCOUNT=DDCS11,L,LLLX1),COLORRED,LINETHICK1;
 

{涨停标注}
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;
 

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
A1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
A2:=BARSLAST(REF(CROSS(DIFF,DEA),1));
VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
HONGJU:=IF(VAR1>0,VAR1,0);
GAOPAO:=CROSS(DIFF,DEA) AND HONGJU>=40;
DRAWICON(GAOPAO,HIGH*1.01,6);
DRAWTEXT(GAOPAO,HIGH*1.02,'顶背'),COLORGREEN;
LLVV:=LLV(LOW,5);
DIXI:=CROSS(DEA,DIFF) AND REF(DEA,A1+1)>0 AND DEA<0;
DRAWICON(DIXI,LOW*0.90,38);
DRAWTEXT(DIXI,LOW*0.90,'波段低吸'),COLORYELLOW;
 

MA20:=MA(CLOSE,20);
M0:=MA(CLOSE,5);
M10:=MA(CLOSE,12);
M1:=MA(CLOSE,20);
M30:=MA(CLOSE,30);
M2:=MA(CLOSE,60);
M3:=MA(CLOSE,240);
M4:=MA(CLOSE,120);
M41:=MA(CLOSE,41);
TJ2:=MA(CLOSE,3)<M2;
VAR2:=(CLOSE*2+HIGH+LOW)/4;
SK:=EMA(VAR2,13)-EMA(VAR2,73);
SD:=EMA(SK,2);
短线:=CROSS(SK,SD) AND SK<0.05 AND (VOL/MA(VOL,5)>2 OR CLOSE/REF(CLOSE,1)>0.035 AND CLOSE>EMA(CLOSE,17));
{STICKLINE(短线,HIGH,LOW,0.5,0),COLORFFFF00;
STICKLINE(短线,OPEN,CLOSE,10,1),LINETHICK2,COLORFFFF00;}
CY:=BARSLAST(短线);
MACD双底:=REF(LOW,A2+1)<CLOSE AND CROSS(DIFF,DEA);
介入:=COUNT(短线,4)=1 AND COUNT(MACD双底,1)=1 AND CLOSE/MA(CLOSE,56)*1000>980 AND CLOSE>OPEN AND VOL>=MA(VOL,5) AND DIFF>=-0.1;
DRAWTEXT(介入,LOW*0.92,'起涨点'),COLORRED;
DRAWICON(介入,LOW*0.92,1);
反向顶背:=REF(CLOSE,A2+1)>CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
逃顶:=CROSS(SD,SK) AND SK>0.2 AND VOL/MA(VOL,5)<2;
逃顶成立:=COUNT(逃顶,4)=1 AND COUNT(反向顶背,1)=1;
DRAWICON(逃顶成立,HIGH*1.01,15);
DRAWTEXT(逃顶成立,HIGH*1.01,'逃顶'),COLORGREEN;
N1G:=CLOSE/REF(CLOSE,1)>=1.097 AND HIGH=CLOSE AND NOT(OPEN=HIGH);
A1G:=BARSLAST(N1G);
A2G:=LLV(LOW,A1G-1)>REF(LOW,A1G) AND CLOSE/REF(OPEN,A1G)>1 AND CLOSE/REF(OPEN,A1G)<=1.04;
XGGG:=FILTER(A2G,3) AND A1G>=4 AND A1G<=20;
DRAWICON(XGGG,LOW*0.96,41);
DRAWTEXT(XGGG,LOW*0.96,'涨停秘笈'),COLORYELLOW;
XPP1:=CROSS(DEA,DIFF) AND CLOSE>MA20 AND MA20>REF(MA20,1) AND DIFF>REF(DIFF,A2+1);
DRAWICON(XPP1,LOW*0.96,3);
DRAWTEXT(XPP1,LOW*0.96,'强势洗盘'),COLORWHITE;

LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背离'),COLORWHITE;
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背离'),COLORA6E500;
 

VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2222:=CROSS(VAR1111,0.9);
VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4444:=CROSS(VAR3333,0.9);
压力:= REF(HIGH,BARSLAST(VAR2222));
STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH,BARSLAST(VAR2222)),0.5,1),COLOREA91B5,LINETHICK3;
支撑3:= REF(LOW,BARSLAST(VAR4444));
STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW,BARSLAST(VAR4444)),0.5,1),COLOR00B4FF,LINETHICK3;

PH:=TROUGHBARS(2,5,1);
LL:=HHV(H,PH);
TJ1:=LL=HIGH AND LL<REF(LL,1);{//=1}
支撑:IF(BARSLAST(TJ1),
REF(LOW,BARSLAST(TJ1)),DRAWNULL),COLORFF55BB;
DRAWTEXT(ISLASTBAR,支撑,'支撑'),COLORFF55BB;


多:=EMA(C,3);
空:=EMA(C,5);
均衡:=EMA(空,5);
VARF1:=COUNT(CROSS(多,均衡),2)=1;
VARF2:=COUNT(CROSS(空,均衡),2)=1;
ZAI:=FILTER(VARF1 AND VARF2,2);
DRAWTEXT(ZAI,均衡,'主升↑'),COLORYELLOW;

通达信支撑压力和加仓逃顶指标源码

资源下载链接   资源大小:unknow

关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - RSS订阅 - TOP
湘ICP备09016573号 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZB.COM ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识