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

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

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

1、五日十日线

MAA5:=MA(C,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);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖买进'),COLORMAGENTA;
STICKLINE(买,OPEN,CLOSE,2,0),COLORMAGENTA;
 
{如果涨停显示黄芯,如果跌停显示绿芯}
涨停 := (C /REF(C,1)) > 1.095;
STICKLINE(涨停, HIGH, OPEN, 1, 0), COLORYELLOW;
 
跌停 := C/REF(C,1) < 0.9 ;
STICKLINE(跌停, HIGH, LOW, 1, 0), COLORGREEN;
 
M5:MA(CLOSE,5),  LINETHICK2, COLORRED; {COLORWHITE;}
{M10:MA(CLOSE,10), LINETHICK1, COLORLIRED;}
M20:MA(CLOSE,20),COLORFF00FF, LINETHICK2;
{M25:MA(CLOSE,25),COLORGREEN, LINETHICK2;}
{M30:MA(CLOSE,30),COLORGREEN;}
{M60:MA(CLOSE,60);}
{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);};
 



2、QMA5专用

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.01,'↖买进'),COLORMAGENTA;
STICKLINE(买,OPEN,CLOSE,2,0),COLORMAGENTA;
{如果涨停显示黄芯,如果跌停显示绿芯}
涨停 := (C /REF(C,1)) > 1.095;
STICKLINE(涨停, HIGH, OPEN, 1, 0), COLORYELLOW;
 
跌停 := C/REF(C,1) < 0.9 ;
STICKLINE(跌停, HIGH, LOW, 1, 0), COLORGREEN;
 
{M5:MA(CLOSE,5),  LINETHICK2, COLORRED; {COLORWHITE;}}
{MAA5_T, NODRAW;}
{M10:MA(CLOSE,10), COLORLIRED,  LINETHICK2;}
{M20:MA(CLOSE,20), COLORFF00FF, LINETHICK2;}
{M30:MA(CLOSE,30), COLORGREEN,  LINETHICK2;}
 
DRAWLINE(CURRBARSCOUNT=TOTALBARSCOUNT,CONST(C),CURRBARSCOUNT=1,C,3),COLORBLUE,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('地区:', DYBLOCK);
SBL2 := STRCAT('  行业:', HYBLOCK);
SBL3 := STRCAT('  主题投资:', EXTERNSTR(0,1));
SBL4 := STRCAT(' ', ZDBLOCK);
 
{SBL4 := STRCAT(STRCAT(SBL1, SBL2), SBL3);}
SBL5 := STRCAT(STRCAT(SBL1, SBL2), SBL4);
DRAWTEXT_FIX(1,0.0,0,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;
 
 
转送:=( FINANCE(7)/REF(FINANCE(7),1) > 1.1 );
STICKLINE(跌停, HIGH, LOW, 1, 0), COLORBLUE;
 



3、小波段买卖( 顶尖财经 股票学院: http://58188.com )

VAR1:=1;
VAR2:=((((2*CLOSE)+HIGH)+LOW) / 4);
高位:90,COLORFFFF00;
低位:20,COLORMAGENTA;
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
C1:(EMA((((VAR2-VAR4)/(VAR5-VAR4))*100),4)*VAR1),COLORFF00FF;
C2:(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR1),COLORFFFFFF;
H1:IF( CROSS(C2,C1),C2,DRAWNULL),CROSSDOT,LINETHICK7,COLORYELLOW;
F1_:IF(CROSS(C2,C1),C2,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORRED;
DRAWTEXT(CROSS(C1,C2),REF(C2,1),'种金'),COLORRED;
DRAWTEXT(CROSS(C2,C1),REF(C1,1),'收获'),COLORGREEN;
H2:IF( CROSS(C1,C2),C1,DRAWNULL),CROSSDOT,LINETHICK7,COLORMAGENTA;
F2_:IF(CROSS(C1,C2),C1,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORYELLOW;
DRAWICON(CROSS(C1,C2) AND C2>0,C2,1);
DRAWICON(CROSS(C2,C1) AND C2<-100,C1,2);
DRAWICON(CROSS(C1,C2) AND C2<0,C2,1);
DRAWICON(CROSS(C2,C1) AND C2>-100,C1,2);
条件:=CROSS(C1,C2) AND C1<40;
条件0:=CROSS(C2,C1) AND C1>90;
TJ1:=CROSS(C1,C2);
TJ2:=CROSS(C2,C1);
TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;
TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;
DRAWTEXT(条件,20,'买'),COLORWHITE;
DRAWTEXT(条件0,85,'卖'),COLORYELLOW;

上一篇:通达信源码:宝宝强势涨停,打板指标公式来了,今日交易

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