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

通达信源码:Q分时主图,裸K线,短线MACD进出

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

1、Q分时主图

这个分时公式,需要一个引用公式,也在附件里提供了,下载后,两个公式都导入,不要改名。

 {放到前面,这样不会覆盖其它画线}

MA30:=EMA(CLOSE,30);
强弱:=EMA(CLOSE,900);
STICKLINE((MA30>强弱),MA30,强弱,1,0),COLOR0000FF;
STICKLINE((MA30<强弱),MA30,强弱,1,0),COLOR00FF00;
H11:=MAX(DYNAINFO(3),DYNAINFO(5));
L11:=MIN(DYNAINFO(3),DYNAINFO(6));
P11:=H11-L11;
阻力:=L11+P11*7/8,COLOR00DD00;
支撑:=L11+P11*0.5/8,COLOR00DD00;
现价:=CLOSE,COLORWHITE,LINETHICK1;
 
 
QMA1:="Q_MA.MA1#DAY", NODRAW;
QMA5:="Q_MA.MA5#DAY", NODRAW, LINETHICK3, COLORRED;
{QMA10:="Q_MA.MA10#DAY", CROSSDOT,LINETHICK4,  COLORGREEN; {COLORLIRED;}
QMA10:="Q_MA.MA10#DAY", NODRAW; 
 
{如果分时图上,10日均线偏离太远,就不显示了,否则分时显示百分比有点大}
MA5_2: IF( ABS((QMA1-QMA5)/QMA1 ) < 0.06, QMA5, C), LINETHICK2, COLORRED;
DRAWTEXT(ISLASTBAR, MA5_2,  STRCAT(' 5日线: ',CON2STR(MA5_2,2))),COLORRED;
MA10_2: IF( ABS((QMA1-QMA10)/QMA1 ) < 0.06, QMA10, C), LINETHICK2, COLORGREEN;
DRAWTEXT(ISLASTBAR, MA10_2,  STRCAT(' 10日线: ',CON2STR(MA10_2,2))),COLORGREEN;
 
 
 
{低部显示}
SBL1 := STRCAT('1.地区:', DYBLOCK);
SBL2 := STRCAT('   2.行业:', HYBLOCK);
SBL3 := STRCAT('   3.主题投资:', EXTERNSTR(0,1));
SBL4 := STRCAT(' ', ZDBLOCK);
SBL41 := STRCAT('  4.概念: ',  GNBLOCK);
 
SBL5 := STRCAT(STRCAT(STRCAT(SBL1, SBL2), SBL4), SBL41);
{DRAWTEXT_FIX(ISLASTBAR, 0,   0.75,    0, SBL5),COLORFF6000;}
 
 
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
{流通盘:=STRCAT(STRCAT('  流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');}
全流通:=STRCAT('  流通比: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
流通值:=(CAPITAL/1000000)*C;
市值:=STRCAT(STRCAT('  流通: ',CON2STR(流通值,2)),'亿');
股本市值:=STRCAT('市值: ',STRCAT(STRCAT(STRCAT(总股本,全流通),市值),''));
{DRAWTEXT_FIX(ISLASTBAR,0.005,0.115,0,股本市值),COLORBLUE;}
DRAWTEXT_FIX(流通值>100,  0, 0.85,  0, 股本市值),COLORGREEN;     {大于100亿显示绿色}
DRAWTEXT_FIX(流通值<=100, 0, 0.85, 0, 股本市值),COLORRED;      {小于100亿显示红色}
 
 
{显示上涨与下跌家数}
上涨家数:=STRCAT('沪深:上涨家数: ', CON2STR(DYNAINFO(60), 0));
下跌家数:= STRCAT('    下跌家数', CON2STR(DYNAINFO(61),0));
差:=STRCAT('   差:',  CON2STR(DYNAINFO(60)-DYNAINFO(61), 0));
 
大盘1:=STRCAT(上涨家数, STRCAT(下跌家数, 差) );
DRAWTEXT_FIX(DYNAINFO(60)-DYNAINFO(61) > 10, 0.0, 0.001, 0, 大盘1), COLORRED;
DRAWTEXT_FIX(DYNAINFO(60)-DYNAINFO(61) < 10, 0.0, 0.001, 0, 大盘1), COLORGREEN;
 
{显示 总卖 总买
总卖:=STRCAT('总卖', CON2STR(CUR_SELLORDER, 0) );
总买:=STRCAT('总买', CON2STR(CUR_BUYORDER, 0) );
DRAWTEXT_FIX(1, 0.7, 0.7, 0, STRCAT(总卖,总买) );
}
 
{上证指数:="Q_大盘分时.A#DAY";}
{上证指数:=1;}
{DRAWTEXT_FIX(1, 0.0, 0.1, 0, STRCAT('大盘指数:',CON2STR(上证指数,2))),COLORBLUE;}
 
 
 
{STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORRED; }
{DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'吸吸吸'),COLORRED;{吸}
DRAWICON(LONGCROSS(支撑,现价,2), 支撑*0.99, 9),COLORRED;{低吸}
DRAWICON(LONGCROSS(现价,阻力,2), 现价, 15),COLORGREEN;{抛,跑路};
 
DRAWTEXT_FIX(1, 0.65, 0.9, 0, '此函数有未来,新手不要用。。。'),COLORBLUE;
 
 
 
{坤隆个股T+0分时买卖.TNE}
个股基数:=自适应参数.GGS1#DAY;
个股基数2:=自适应参数.GGB1#DAY;
RSV:=(CLOSE-LLV(LOW,89))/(HHV(HIGH,89)-LLV(LOW,89))*100;
K:=SMA(RSV,14,1);
D:=SMA(K,5,1);
J:=3*K-2*D;
K1:=EMA(RSV,14);
D1:=EMA(D,5);
J1:=3*K1-2*D1;
JJX:=SUM(AMOUNT,0)/SUM(VOL,0)/100;
H1:=C>REF(C,1) AND C/JJX>1.06;
L1:=C<REF(C,1) AND C/JJX<0.94;
DRAWICON(CROSS(个股基数2,K1) AND EVERY(K1<D1,10) AND D1<REF(D1,1) OR FILTER(L1,400) {OR (REF(D1,1)=0 AND REF(K1,1)=0 AND REF(J1,1)=0 AND J1>K1)},C*0.995, 13);
DRAWICON(CROSS(K1,个股基数) AND EVERY(K1>D1,10) AND D1>REF(D1,1)  OR FILTER(H1,400),C*1.005, 14);
 
{小飞T+0增强版.TNE" }
 
均价3:=SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
TT:=BARSCOUNT(C);均:=MA(C,TT);
上均线:=均+2*STD(C,3);下均线:=均-2*STD(C,3);
时长:=TIME>93000;涨幅:=C/REF(C,1)>1.02;跌幅:=C/REF(C,1)<0.98;
横盘:=((HHV(C,TT)-LLV(C,TT))/C)<0.05;YY:=SMA(VOL,30,1);
放量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.95;
涨跌幅:=涨幅 OR 跌幅;
横涨1:=涨跌幅=0 AND 横盘  AND 放量 AND CROSS(均价3,均);
DRAWTEXT(FILTER(横涨1,10),C,'突'), COLORRED;
DRAWICON(FILTER(横涨1,10),均价3,1);
 
 
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主力:=EXPMA(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120);
底:=1;1.02,NODRAW;高:=1.03;
AA:=主力>大户 AND 主力>1.003 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60);
DRAWICON(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C,38);
DRAWTEXT(主力>大户 AND 大户>散户 AND C>EXPMA(C,20) AND EXPMA(C,10)>EXPMA(C,20) AND EXPMA(C,20)>EXPMA(C,60) AND 主力=HHV(主力,30) AND CROSS(主力,1.003),C*0.999,'-主力'),COLORBLUE;
{DRAWICON(CROSS(主力,1.02),C,24);}
DRAWTEXT(CROSS(主力,1.02),C*0.999,'--拉升'),COLORRED;
{DRAWICON(CROSS(主力,1.04),C,6);}
DRAWTEXT(CROSS(主力,1.04),C*0.999,'--冲涨停'),COLORRED;
{DRAWICON(CROSS(散户,主力),C,6);}
DRAWTEXT(CROSS(散户,主力),C*0.9995,'--小心'),COLORBLUE;
{DRAWICON(CROSS(散户,大户),C,6);}
DRAWTEXT(CROSS(散户,大户),C*0.9995,'--走弱'),COLORBLUE;
 
 
 
均价:SUM(V*C,0)/SUM(V,0), LINETHICK3, COLORFF00FF; {粉色};
{昨高点:REF(HIGH,1), LINETHICK2, COLORFF00FF; //这样显示是今天的均线};
 
CC:C, LINETHICK2, COLORBLUE; {价格线显示成蓝色};
 
{KDJ分时显示}
{FS_K := (KDJ.K#MIN30 / 100.0 ), NODRAW;
{FS_D := KDJ.D#MIN30, NODRAW;
DRAWTEXT(CROSS(FS_K, FS_D) AND FS_K<60, C, '30买');
DRAWTEXT(CROSS(FS_D, FS_K) AND FS_K>40, C, '30死');
};
 
 
CUR_SELL1:="Q_MA.CUR_SELL#DAY", NODRAW;
CUR_BUY1:="Q_MA.CUR_BUY#DAY", NODRAW;
DRAWTEXT_FIX(1, 0.80, 0.18, 0, STRCAT('总卖:', CON2STR(CUR_SELL1, 0)) ),COLORBLUE;
DRAWTEXT_FIX(1, 0.80, 0.25, 0, STRCAT('总买:', CON2STR(CUR_BUY1, 0)) ),COLORBLUE;
 



2、裸K线( 顶尖财经 股票学院: http://58188.com )

{

 2015-05-08 修改
}
MAA5:=MA(C,5);
MAA5_T:= ( (C+ C + REF(C,1) + REF(C,2) + REF(C,3) ) / 5 );
MAA10:=MA(C,10);
MAA20:=MA(C,20);
MAA30:=MA(C,30);
KS:=IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
A9:=( (C-REF(C,1)) / REF(C,1) ) > 0.02;  {涨幅要大于2%}
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2)) AND A9;
DRAWTEXT(FILTER(买=1,5),LOW*0.93,'买'),COLORMAGENTA;
STICKLINE(买,OPEN,CLOSE,2,0),COLORMAGENTA;
 
{如果涨幅大于5%,显示黄色}
涨幅5 := ( (C /REF(C,1)) > 1.05 ) AND ( (C /REF(C,1)) < 1.09 ) ;
STICKLINE(涨幅5, CLOSE, OPEN, 1, 0),  COLOR8000FF;
 
 
{如果涨停显示黄芯,如果跌停显示绿芯}
涨停 := (C /REF(C,1)) > 1.09;
STICKLINE(涨停, HIGH, OPEN, 0.9, 0), COLORYELLOW;
 
 
 
{如果涨幅大于5%,显示黄色}
跌幅5 := ( (C / REF(C,1)) < 0.95 ) ;
{STICKLINE(跌幅5, OPEN, CLOSE, 1, 0), COLOR400000;}
 
跌停 := C/REF(C,1) < 0.9 ;
STICKLINE(跌停, HIGH, LOW, 1, 0), COLORBLUE;
 
 
M5:MA(CLOSE,5), LINETHICK1, COLORRED; {COLORWHITE;}
MAA5_T, NODRAW;
M10:MA(CLOSE,10), NODRAW,  COLORLIRED,  LINETHICK2;
M20:MA(CLOSE,20), NODRAW, COLORFF00FF; {, LINETHICK2;}
M30:MA(CLOSE,30), NODRAW, COLORGREEN; {,  LINETHICK2;}
 
T:=5;
MM:=MA(CLOSE,T);
上升:IF(MM>REF(MM,1), MM, DRAWNULL) ,COLORRED,LINETHICK2;
下降:IF(MM<REF(MM,1), MM, DRAWNULL), COLORGREEN,LINETHICK2;
{显示当日价格线}
DRAWLINE(CURRBARSCOUNT=60, CONST(C), CURRBARSCOUNT=1, C, 3),COLORBLUE,LINETHICK1;
 
 
 
{显示20日线}
{M20DAYS:=MA(CLOSE,20);}
{DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,M20DAYS,3),COLORFF00FF, DOTLINE,LINETHICK1;}
 
 
{M60:MA(CLOSE,60); POINTDOT}
{M89:MA(CLOSE,89),LINETHICK2,COLORFF9966;}
{//一二零日:=MA(C,120),LINETHICK1,COLOR000099;
//一四四日:MA(C,144),LINETHICK1,COLORFF3300; //BLUE
}
 
{M90:MA(CLOSE,90);}
{M120:MA(CLOSE,120);}
{M250:MA(CLOSE,250);};
 
{//顶部显示}
{//顶部显示}
SBL1 := STRCAT('1地区:', DYBLOCK);
SBL2 := ' ';{STRCAT('   2行业:', HYBLOCK);}
SBL3 := STRCAT('   3主题投资:', EXTERNSTR(0,1));
SBL4 := STRCAT(' ', ZDBLOCK);
SBL41 := STRCAT(STRCAT('  4.概念: ',  GNBLOCK), STRCAT('   55.自定义:', ZDBLOCK) );
SBL43 := STRCAT(' 5.风格:', FGBLOCK);
 
 
{SBL4 := STRCAT(STRCAT(SBL1, SBL2), SBL3);}
SBL5 := STRCAT(STRCAT(STRCAT(STRCAT(SBL1, SBL2), SBL4), SBL41), SBL43);
DRAWTEXT_FIX(1, 0.0, 0.0.1, 0, SBL5),COLORFF6000;
 
 
{底部显示}
SBL:= STRCAT('                                ', STRCAT(STRCAT(STRCAT(HYBLOCK,DYBLOCK),GNBLOCK),ZDBLOCK) );
{DRAWTEXT_FIX(1,0,70,0,SBL),COLORFF6000;}
DRAWTEXT_FIX(ISLASTBAR,0,70,0,SBL3),COLORFF6000;
 
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
{流通盘:=STRCAT(STRCAT('  流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');}
全流通:=STRCAT('  流通比: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
流通值:=(CAPITAL/1000000)*C;
市值:=STRCAT(STRCAT('  流通: ',CON2STR(流通值,2)),'亿');
股本市值:=STRCAT('市值: ',STRCAT(STRCAT(STRCAT(总股本,全流通),市值),''));
{DRAWTEXT_FIX(ISLASTBAR,0.005,0.115,0,股本市值),COLORBLUE;}
DRAWTEXT_FIX(流通值>100,0,0.12,0,股本市值),COLORGREEN;     {大于100亿显示绿色}
DRAWTEXT_FIX(流通值>=160,0,0.12,0,股本市值),COLORBLUE;      {小于100亿显示蓝色}
DRAWTEXT_FIX(流通值>=150,0.60,0.12,0,'XXXXXXXXXXXXXXXXXXXX'),COLORBLUE;      {小于100亿显示蓝色}
DRAWTEXT_FIX(流通值<=100,0,0.12,0,股本市值),COLORRED;      {小于100亿显示红色}
 
 
 
 
{显示向上的跳空缺口}
GAPUP:=LOW>REF(HIGH,1);
COND1:=LLV(LOW,BARSLAST(GAPUP))>=REF(HIGH,BARSLAST(GAPUP)+1);
COND2:=BACKSET(COND1,3);
COND22:=COND2>REF(COND2,1);
COND222:=LLV(LOW,BARSLAST(COND22))>=REF(HIGH,BARSLAST(COND22));
COND2222:=LOW<REF(HIGH,BARSLAST(COND22));
STICKLINE(COND222 AND BARSLAST(COND22)>=2, REF(HIGH,BARSLAST(COND22)), REF(HIGH,BARSLAST(COND22))+0.02, 20,0),COLORRED;
 
 
{十字线为跳空缺口当日的最高价或最低价,空心晶红色线为向上缺口,灰色实体线为向下缺口。由此产生支撑与压力。}
{缺口:=(L>REF(H,1));
不破:=(ALL(L>REF(H,BARSLAST(缺口)+1),BARSLAST(缺口)+1));
STICKLINE(不破,REF(H,BARSLAST(缺口)+1),REF(L,BARSLAST(缺口)),10,1),COLORMAGENTA;
下缺口:=(H<REF(L,1));
不补:=(ALL(H<REF(L,BARSLAST(下缺口)+1),BARSLAST(下缺口)+1));
STICKLINE(不补,REF(L,BARSLAST(下缺口)+1),REF(H,BARSLAST(下缺口)),10,0),COLORGRAY;
N:=25;
缺口低:REF(L,BARSLAST(H<REF(L,1))),COLORGRAY,LINETHICK;
PARTLINE(BARSLAST(H<REF(L,1))+1<N,缺口低),COLORGRAY,LINETHICK1,CROSSDOT;
缺口高:REF(H,BARSLAST(L>REF(H,1))),COLORMAGENTA,LINETHICK;
PARTLINE(BARSLAST(L>REF(H,1))+1<N,缺口高),COLORMAGENTA,LINETHICK1,CROSSDOT;
};
 
Q2:=REF(O,2)>REF(C,2);{2日前的开盘价>2日前的收盘价}
Q1:=REF(O,1)>REF(C,1) AND REF(C,1)<REF(C,2); {1日前的开盘价>1日前的收盘价 AND 1日前的收盘价<2日前的收盘价}
YBY:=C>O AND C>REF(H,1); {目前是阳线 AND 当前价>1日前的最高价}
YZ:=YBY AND Q1 AND Q2 AND REF(C,1)<REF(C,2); {连跌2天,今天收阳了}
DRAWICON(YZ AND C<55 AND DYNAINFO(4)>0,L*0.95,9);
XG:DRAWTEXT(YZ AND C<55 AND DYNAINFO(4)>0,L*0.90,'逆转');
STICKLINE(XG,OPEN,CLOSE,2,0),COLORMAGENTA;
 
{显示1 到 10的数字}
ZT:=BARSLAST(C/REF(C,1)-1>=0.1-0.01/REF(C,1) AND C=H);
AQ:=EVERY(C>=REF(L,ZT),ZT);
BQ:=IF(REF(AQ,ZT+1) AND REF(ZT,ZT+1)<13,REF(ZT,ZT+1)+ZT+1,ZT);
 
DRAWTEXT(ZT<=10 AND AQ,              REF(L,ZT)*0.96, VAR2STR(ZT,0)),COLOR008000;
DRAWTEXT(ZT>=6 AND ZT<=8 AND AQ,     REF(L,ZT)*0.96, VAR2STR(ZT,0)),COLORRED;
DRAWTEXT(BQ>0 AND BQ<=10 AND BQ!=AQ, REF(L,BQ)*0.96, VAR2STR(BQ,0)),COLOR008000;
DRAWTEXT(BQ>=6 AND BQ<=8 AND BQ!=AQ, REF(L,BQ)*0.96, VAR2STR(BQ,0)),COLORRED;
 
 
{大宗交易, 大宗交易的价格超过收盘价,叫溢价,低于收盘价叫折价}
大宗交易 := SIGNALS_USER(298, 0), NODRAW; 
减持金额 :=  VARCAT(VAR2STR(大宗交易/10000.0 , 2),'亿'); {单位是:亿}
 
{FLOAT FBILIU =  (收盘价 - 成交价) / 收盘价;}
比率     := FRACPART(大宗交易), NODRAW; {得到小数部分,带正负符号的}
 
成交价   := C - C*比率,  NODRAW; 
 
{成交价格小于收盘价,0.1,折价甩卖,显示绿色}
{DRAWTEXT(比率>0, H, 减持金额),  COLOR008000; 
DRAWTEXT(比率>0, 成交价, '减----'),  COLOR008000; }
DRAWTEXT(比率>=0, H*1.015, '减'),  COLOR008000; 
DRAWTEXT(比率>=0, 成交价, 减持金额),  COLOR008000; 
 
 
{//成交价格高于收盘价0.5,溢价,显示红色}
DRAWTEXT(比率<0, 成交价, 减持金额),  COLORRED; 
 
 
 
{除权后显示蝴蝶}
{FINANCE(1)=总股本 FINANCE(7)=流通股本}
除权条件 := ( FINANCE(1)>REF(FINANCE(1),1) ) AND (FINANCE(7)>REF(FINANCE(7), 1)  AND 流通值<=1000);
送股数   := (FINANCE(1)/REF(FINANCE(1), 1)-1)*10;
DRAWICON(除权条件, H, 28);
DRAWTEXT(除权条件, L*0.98, '高转送'),  COLORRED;
DRAWNUMBER(除权条件, L*0.96, 送股数), COLORRED;
 
{通达信自带的撑压线  }
{
N:=7;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1<E2));
H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
S1:=R1>REF(R1,1);
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1);
NOTEXT1:DRAWLINE(S2,H,S1,H,1),LINETHICK2,COLORRED;
NOTEXT2:DRAWLINE(U2,L,U1,L,1),LINETHICK2,COLORGREEN;
}
 
{跳空高开 并且 涨停}
TJ1 := (O > REF(C, 1)) AND  (C>=REF(C,1)*1.095);
TJ2 := VOL > 40000; {去除停牌和低成交量连板的股票;}
DRAWICON(TJ1 AND TJ2, H*1.0618, 25);
DRAWICON(TJ1 AND TJ2, H*1.0718, 25);
 
 
上轨:(1+6/100)*MA(CLOSE,25), COLORBLUE,LINETHICK1;




3、短线MACD进出

VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR6:=(VAR3+VAR4+VAR5)/3;
VAR7:=EMA(VAR6,5);
指标: EMA(EMA(VAR3,5),5)*3, COLORSTICK;
VAR8:=IF(VAR6<=-20,10,0);
VAR9:=HHV(VAR8,10);
STICKLINE(VAR8=10,20,10,5,0),COLOR6666FF;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
DRAWTEXT(VARA=20,15,'底部'),LINETHICK1,COLORWHITE;
STICKLINE((VARA=20),0,10,5,0),COLORWHITE;
VARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)<=REF(ZIG(3,5),3));
VARD:=(ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)>=REF(ZIG(3,5),3));
STICKLINE((VARC=1),(-14),0,4,0),COLOR0000FF;
DRAWTEXT((VARC=1),(-14),'进'),COLOR0000FF;
STICKLINE((VARD=1),14,0,4,0),COLOR00FF00;
DRAWTEXT((VARD=1),18,'出'),COLOR00FF00;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARF<REF(VAR10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,15,'大资金活动'),LINETHICK1,COLORFF00FF;
STICKLINE(VAR11 AND COUNT(VAR11,30)=1,1,10,5,0),COLORFF00FF;

上一篇:通达信源码:五日十日线,QMA5专用,小波段买卖

下一篇:通达信公式下载:底部买入,缠论精确分笔,抓涨停,看盘模板改良版