当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:支撑压力位,立德趋势,妖股玄玄

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、支撑压力位

做股票不能完全靠公式,但没有公式辅助是万万不可得,( 顶尖财经 股票学院: http://58188.com )
这个公式让你知道这只股票的支撑压力位在哪里,什么时候应该止盈、什么时候应该止损,一目了然。

{支撑压力位}
N:=8;
AAB:=REF(H,10)=HHV(H,2*11);
QQHY:=BACKSET(AAB,10+1);
CCW:=FILTER(QQHY,10) AND H=HHV(H,11);
卖出:DRAWICON(CCW,H*1.02,12);
AAB1:=REF(L,10)=LLV(L,2*11);
QYY1:=BACKSET(AAB1,11);
CCD1:=FILTER(QYY1,10) AND L=LLV(L,11);
买入:DRAWICON(CCD1,L*0.98,11);
ZGD:=HHV(H,60);
ZGD2:=CONST(ZGD);
ZDD:=LLV(L,60);
ZDD2:=CONST(ZDD);
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
KOH:=L>REF(H,1);
KOL:=H<REF(L,1);
HIF:=L>REF(H,BARSLAST(KOH)+1);
NHIF:=L<=REF(H,BARSLAST(KOH)+1);
LIF:=H<REF(L,BARSLAST(KOL)+1);
NLIF:=H>=REF(L,BARSLAST(KOL)+1);
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
RRRSV:=SMA(下档线,3,1);
KKK:=SMA(RRRSV,3,1);
DDDDD:=((3 * RRRSV) - (2 * KKK));
JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
RSV24:=SMA(JJ12,3,1);
K24:=SMA(RSV24,3,1);
D24:=((3 * RSV24) - (2 * K24));
压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;
底部:=LLV(HIGH,30),COLOR00FF00;
AA:=REF(H,N)=HHV(H,2*N+1); 
AA1:=REF(L,N)=LLV(L,2*N+1);
QY:=BACKSET(AA,N+1); 
QY1:=BACKSET(AA1,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1); 
CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DDD:=BARSLAST(CC); 
DD1:=BARSLAST(CC1);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS); 
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=CONST(DINGBUTS); 
DDCS1:=CONST(DDTS1);
S13:=CONST(REF(HIGH,GDCS1-1)); 
GDCS13:=S13;
DDCS13:=CONST(REF(L,DDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1);
DDTS2:=REF(DDTS1,DD1+1);
GDCS2:=CONST(DINGBUTS1);
DDCS2:=CONST(DDTS2);
S23:=CONST(REF(HIGH,DINGBUTS1-1));
GDCS23:=S23;
DDCS23:=CONST(REF(L,DDTS2-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);
XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1); 
XD2:=BACKSET(ISLASTBAR,DDTS2);
XDD:=IF(DDCS13<=DDCS23,XD1,XD2);
BCG:=SUM(XG1,0); BCD:=SUM(XDD,0);
今日阻力:=REF(明日阻力 , 1),NODRAW;
今日支撑:=REF(明日支撑 , 1),NODRAW;
压力位:=IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;
底部位:=IF(ISLASTBAR,底部,DRAWNULL),NODRAW;
高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) ,COLORGREEN,LINETHICK2;
低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORGREEN,LINETHICK2;
高:=CONST(MAX(MAX(MAX(ZGD2,高点压力),GDCS13),GDCS23));
低:=CONST(MIN(MIN(MIN(ZDD2,DDCS23),DDCS13),低点支撑));
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:=DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLOR555555,LINETHICK2;
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,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);
WWW58188COM:=CONST(DINGBUTS11);
高点压力M:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRED,LINETHICK1;
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);
低点支撑M:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORRED,LINETHICK1;
STICKLINE(XG2 ,GDCS23,GDCS23,2.5,1), COLORWHITE;
STICKLINE(XG1,GDCS13,GDCS13,2.3,1), COLORYELLOW;
STICKLINE(XD2 ,DDCS23,DDCS23,0.5,1),COLORMAGENTA;
STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;
STICKLINE(ISLASTBAR ,压力位,压力位,120,0),COLORFFFFFF;
STICKLINE(ISLASTBAR ,底部位,底部位,100,0),COLOR00FF00;
庄家控筹:=MA(EMA(WINNER(C),3),40);
VARS:=庄家控筹>REF(庄家控筹,4);
量比:=VOL*5/SUM(REF(VOL,1),5)>1;
换手:=V/CAPITAL*100>3;
VAR1:=EMA(EMA(CLOSE,9),9);
KP:=(VAR1-REF(VAR1,1))/REF(VAR1,1);
VAR2:=100*WINNER(CLOSE*0.95);
GKP:=VARS AND 量比 AND 换手 ;
高控盘:=GKP;
DRAWICON(CROSS(C,GDCS23) AND 高控盘,L-0.20,5);
DRAWICON(CROSS(C,GDCS13) AND 高控盘,L-0.80,5);
DRAWICON(CROSS(C,DDCS23) AND 高控盘,L-0.60,5);



2、立德趋势

{立德趋势}

 
YXSJ:=18123099;
YX:=IF(1<1000000+YXSJ,1,0); 
;{指标有效期};
{==============以下一段显示板块信息==============}
WZ1:=STRCAT('所属行业:',HYBLOCK);
WZ2:=STRCAT('  所属地区:',DYBLOCK);
WZ3:=STRCAT('  题材:',GNBLOCK);
HB:=STRCAT(WZ1,WZ2);
题材概念:=STRCAT(HB,WZ3);
{DRAWTEXT_FIX(C>0 AND PERIOD=5,0.01,0,0,题材概念),COLORYELLOW;}
 
DRAWTEXT_FIX(YX=0,0.21,0.2,0,'系统崩溃,请删除重新安装'),COLORYELLOW;
 
}
UPX:="BOLL-M".UB;
LPX:="BOLL-M".LB;
 
XC:=O<BOLL.UB AND (O<EMA(C,250) OR O<MA(L,250))
AND  (O<MA(C,60) OR O<EMA(C,50) OR O<EMA(C,40)) 
AND (O<MA(C,120)  OR O<EMA(L,120))
AND (O<MA(C,20) OR O<EMA(C,40))
AND (C/REF(C,1)>1.09 OR C/O>1.09 OR C/L>1.095) AND C/L>1.03 
AND H>L AND H>O AND (C>=H*0.975 OR C/O>1.09)
AND H/L>=MA(H/L,10);
含金量:=SUM(XC AND PERIOD=5,300),NODRAW,COLORYELLOW;
DRAWICON(XC AND PERIOD=5,L*0.985,9);
 
M5:IF(显示趋势方向=0,MA(CLOSE,5),DRAWNULL),COLORWHITE;
M10:IF(显示趋势方向=0,MA(CLOSE,10),DRAWNULL),COLORYELLOW;
M20:IF(显示趋势方向=0,MA(CLOSE,20),DRAWNULL),COLORMAGENTA;
M60:IF(显示趋势方向=0,MA(CLOSE,60),DRAWNULL),COLORGREEN;
M120:IF(显示趋势方向=0,MA(CLOSE,120),DRAWNULL),COLORWHITE;
{M250:MA(C,250),COLOR009966,LINETHICK3;
IF((EMA(C,40)>MA(C,250) OR MA(C,60)>MA(C,250)), MA(C,250),DRAWNULL),COLORLIRED,LINETHICK3;
牛熊线:IF( MA(C,250)>=REF(MA(C,250),1) AND (EMA(C,40)>MA(C,250) OR MA(C,60)>MA(C,250)), MA(C,250),DRAWNULL),COLOR330099,LINETHICK3;
}
STICKLINE(显示趋势方向=1 AND YX=1 AND EMA(C,20)>EMA(C,40),EMA(C,20),EMA(C,40),1,0),COLORWHITE;
STICKLINE(显示趋势方向=1 AND YX=1 AND EMA(C,20)<=EMA(C,40),EMA(C,20),EMA(C,40),1,0),COLORCYAN;
STICKLINE(显示趋势方向=1 AND YX=1  AND EMA(C,20)>EMA(C,40) AND (EMA(C,40)>MA(C,250) OR EMA(C,40)>EMA(C,250)),EMA(C,20),EMA(C,40),1,0),COLOR6699FF;
STICKLINE(显示趋势方向=1 AND YX=1  AND EMA(C,20)<EMA(C,40) AND EMA(C,20)>MA(C,250),EMA(C,20),EMA(C,40),1,0),COLORFF9966;
 
STICKLINE(显示趋势方向=1 AND YX=1  AND EMA(C,20)<=EMA(C,40) AND EMA(C,40)<MA(C,250),EMA(C,20),EMA(C,40),1,0),COLORGREEN;
 
IF(显示趋势方向=1  AND YX=1 ,EMA(CLOSE,12),DRAWNULL),COLORWHITE;
IF(显示趋势方向=1  AND YX=1 AND EMA(C,12)>EMA(C,40),EMA(CLOSE,12),DRAWNULL),COLORLIRED;
IF(显示趋势方向=1  AND YX=1 AND EMA(C,12)>EMA(C,40) AND EMA(C,40)>MA(C,250),EMA(CLOSE,12),DRAWNULL),COLORRED;
IF(显示趋势方向=1  AND YX=1 AND EMA(C,12)<EMA(C,40) AND EMA(C,40)<MA(C,250) ,EMA(CLOSE,12),DRAWNULL),COLORGREEN;
 
IF(显示趋势方向=1  AND YX=1 ,EMA(CLOSE,40),DRAWNULL),COLORWHITE,LINETHICK2;
IF(显示趋势方向=1  AND YX=1 AND EMA(C,12)>EMA(C,40),EMA(CLOSE,40),DRAWNULL),COLORLIRED ,LINETHICK2;
IF(显示趋势方向=1  AND YX=1 AND EMA(C,12)>EMA(C,40) AND (EMA(C,40)>MA(C,250) OR EMA(C,40)>EMA(C,250)),EMA(CLOSE,40),DRAWNULL),COLORRED,LINETHICK2;
IF(显示趋势方向=1  AND YX=1 AND EMA(C,12)<EMA(C,40) AND EMA(C,40)<MA(C,250),EMA(CLOSE,40),DRAWNULL),COLORGREEN,LINETHICK2;
 
 
DRAWKLINE(H,O,L,C);
RSILC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-RSILC,0),6,1)/SMA(ABS(CLOSE-RSILC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-RSILC,0),12,1)/SMA(ABS(CLOSE-RSILC),12,1)*100;
RSI3:=SMA(MAX(CLOSE-RSILC,0),24,1)/SMA(ABS(CLOSE-RSILC),24,1)*100;
{=========}
ZXD:=60;ZXC:=130;ZXMID:=45;
ZXDIF:=EMA(CLOSE,ZXD)-EMA(CLOSE,ZXC),COLORRED,LINETHICK2;
ZXDEA:=EMA(ZXDIF,ZXMID),COLORWHITE;
ZXMACD:=(ZXDIF-ZXDEA)*2,COLORSTICK,LINETHICK3;
{================}
 
 
ZXEMAQJX:=BARSLAST(REF(CROSS(EMA(C,12),EMA(C,50)),1));
ZXEMAQSX:=BARSLAST(REF(CROSS(EMA(C,50),EMA(C,12)),1));
DXEMAQJX:=BARSLAST(REF(CROSS(EMA(C,12),EMA(C,26)),1));
DXEMAQSX:=BARSLAST(REF(CROSS(EMA(C,26),EMA(C,12)),1));
MACDQJX:=BARSLAST(REF(CROSS(MACD.DIF,MACD.DEA ),1));
MACDQSX:=BARSLAST(REF(CROSS(MACD.DEA,MACD.DIF),1));
 
EMA2JX:=((CROSS(EMA(C,12),EMA(C,50)) AND C>REF(C,ZXEMAQSX) AND C>REF(C,ZXEMAQJX)) OR (CROSS(EMA(C,12),EMA(C,26)) AND C>REF(C,DXEMAQJX) AND C>REF(C,DXEMAQSX)))
AND COUNT(HHV(H,60)/LLV(L,60)>1.38,60)=0
AND (EMA(C,50)>EMA(C,100) OR EMA(C,100)>EMA(C,250) OR MA(C,60)>MA(C,120) OR MA(C,120)>MA(C,250))
AND V>1 AND (MA(V,5)>MA(V,10) OR MA(V,10)>MA(V,60) OR EMA(V,20)>EMA(V,250)) AND YX=1;
 
{DRAWICON(EMA2JX AND PERIOD=5,EMA(L,50),1);
DRAWTEXT(EMA2JX  AND PERIOD=5,EMA(L,50),'金叉'),COLORWHITE;}
 
LT:=LLVBARS(L,60);
LTT:=BARSLAST(CURRBARSCOUNT=CONST(LT)+1);
HT:=FINDHIGHBARS(H,LT+1,60,1);
一元线:DRAWLINE(CURRBARSCOUNT=CONST(HT)+1,C,ISLASTBAR,REF(C,HT),0),COLORBLUE,LINETHICK2;
 
 
{==================}
{STICKLINE(YX=0 ,HHV(H,50),LLV(L,50),8,0),COLORBLUE;};



3、妖股玄玄

{公式名称: 妖股玄玄

公式描述: 共享版
参数数量: 1
参数1: N, 最小: 5, 最大: 10, 缺省: 8}
{副图}
 
DRAWGBK(OPEN>0,RGB(0,0,0),RGB(33,47,58),0,207,0);
VAR1:=(CLOSE-REF(CLOSE,1))*100/REF(CLOSE,1)>=7;
VAR2:=COUNT(VAR1,2)>=1 AND NOT(COUNT(VAR1,3)>=2);
妖股授精:FILTER(VAR2,10),COLORDDDDDD;
VAR3:=COUNT(VAR1,3)>=2 AND NOT(COUNT(VAR1,4)>=3);
妖股孕育:FILTER(VAR3,10),COLORGREEN;
VAR4:=COUNT(VAR1,4)>=3 AND NOT(COUNT(VAR1,5)>=4);
妖股初生:FILTER(VAR4,11),COLOR9933FF;
妖股长成:COUNT(VAR1,8)>=7,COLORRED;
STICKLINE(妖股授精 AND COUNT(妖股授精,18)=1,0,3,3,0),COLORDDDDDD;
STICKLINE(妖股孕育 AND COUNT(妖股孕育,18)=1,0,3,3,0),COLORGREEN;
STICKLINE(妖股初生 AND COUNT(妖股孕育,18)=1,0,2,3,0),COLOR9933FF;
STICKLINE(妖股长成 AND COUNT(妖股孕育,18)=1,0,1,3,0),COLORRED;

上一篇:通达信源码:强力阻击,低位黑马主图,主力资金

下一篇:通达信源码:成交量+资金流向 VOLTDX3 VOLTDX4