通达信均线看图主图公式
公式是tne格式,通达信公式编辑器5.0版本适用
{冷暖气带}
DRAWBAND(MA(C,60),RGB(100,0,0),MA(C,120),RGB(0,0,50));
DRAWBAND(MA(C,5),RGB(0,50,250),MA(C,10),RGB(0,0,0));
DRAWBAND(MA(C,5),RGB(0,0,0),MA(C,20),RGB(0,0,0));
{DRAWBAND(MA(C,5),RGB(190,16,26),MA(C,10),RGB(0,0,30));}
DRAWKLINE(H,O,L,C);
JDZ:=MAX(MA(C,5),MAX(MAX(MA(C,10),MA(C,20)),MAX(MA(C,60),MA(C,120))));
JXZ:=MIN(MIN(MA(C,5),MA(C,10)),MA(C,20));
五买:=REF(C,1)<REF(JDZ,1) AND C>JDZ;
STICKLINE(五买 ,H,L,0,0),COLORRED;
STICKLINE(五买 ,O,C,3,0),COLORRED;
{重下五线}
初下:=CROSS(MA(C,5),C) AND C<REF(C,1) AND MA(C,5)>MA(C,10) AND MA(C,5)>MA(C,20)
AND MA(C,5)>MA(C,60) AND MA(C,5)>MA(C,120);
STICKLINE(初下,H,L,0,0),COLOR50DBDB;
STICKLINE(初下,O,C,3,0),COLOR50DBDB;
五下线1:=C<MA(C,120) AND C<MA(C,10) AND C<MA(C,20) AND C<MA(C,60) AND CROSS(MA(C,5),C);
五下线2:=C>MA(C,120) AND C<MA(C,5) AND C<MA(C,20) AND C<MA(C,60) AND CROSS(MA(C,10),C);
五下线3:=C<MA(C,120) AND C<MA(C,10) AND C<MA(C,5) AND C<MA(C,60) AND CROSS(MA(C,20),C);
五下线:=五下线1 OR 五下线2 OR 五下线3;
STICKLINE(五下线,H,L,0.0,0),COLORLIGREEN;
STICKLINE(五下线,OPEN,CLOSE,0,0),COLORLIGREEN;
下五线1:=C<MA(C,5) AND C<MA(C,10) AND C<MA(C,20) AND C<MA(C,60) AND CROSS(MA(C,120),C);
下五线2:=C<MA(C,120) AND C<MA(C,10) AND C<MA(C,20) AND C<MA(C,5) AND CROSS(MA(C,60),C);
初下五:=下五线1 OR 下五线2;
STICKLINE(初下五,H,L,0,0),COLORLIGREEN;
STICKLINE(初下五,O,C,0,0),COLORLIGREEN;
{涨跌停}
STICKLINE(C>1.097*REF(C,1),C,O,0.1,0),COLORBLUE;
STICKLINE(C<0.907*REF(C,1),C,O,0.1,0),COLOR00CC00;
{均线}
⑤:MA(C,5)COLORWHITE;
⑩:MA(C,10)COLORYELLOW;
⒇:MA(C,20),LINETHICK2,COLORBLUE;
MA60:MA(C,60)COLORGREEN;
MA120:MA(C,120)COLORGRAY;
REFDATE(C,DATE),DOTLINE,{COLOR100088}COLOR114999;
{划线}
HIGHN:=10;
AA:=REF(C,HIGHN)=HHV(C,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND C=HHV(C,HIGHN+1);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(C,DDD),C);
DINGBU1:=REF(DINGBU,DDD+1);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+10);
LOWN:=10;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DD1:=BARSLAST(CC1);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
{短T}
ZZ:=5;
AC:=REF(C,ZZ)=HHV(C,2*ZZ+1);
AD:=BACKSET(AC,ZZ+1);
AE:=FILTER(AD,ZZ) AND C=HHV(C,ZZ+1);
AF:=BARSLAST(AE);
AG:=IF(AE,CURRBARSCOUNT,0);
AH:=IF(AF,REF(C,AF),C);
AI:=IF(AF,REF(AG,AF),AG);
AL:=CONST(AI);
短T:DRAWLINE(CURRBARSCOUNT=AL,C,ISLASTBAR,REF(C,AL-1),1),DOTLINE,COLORYELLOW;
T线:DRAWLINE(CURRBARSCOUNT=GDCS1,C,ISLASTBAR,REF(C,GDCS1-1),1)DOTLINE,COLORWHITE;
过T:IF(CROSS(C,T线),T线,DRAWNULL),CIRCLEDOT,COLORYELLOW;
{多方炮}
X11:=REF(O,2);
Z2Z:=REF(C,2);
L1:=REF(O,1);
K2:=REF(C,1);
H3:=REF(H,1);
P1:=REF(V,2);
P2:=REF(V,1);
Q:=Z2Z>X11 AND L1>=K2 AND C>O AND C>H3 AND P2<P1
AND V>P2 AND C>=Z2Z AND C>⑤ AND C>⑩ AND C>⒇;
多方炮:DRAWTEXT(Q AND CURRBARSCOUNT<20,L,'多方炮');
DRAWICON(CROSS(MA60,MA120),MA120,41);
DRAWICON(CROSS(⑤,⑩) AND CURRBARSCOUNT<20,L,36);
DRAWICON(CROSS(⑩,⑤) AND CURRBARSCOUNT<20,H,37);
{所属行业,所属地区}
DRAWTEXT_FIX(1,0,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.08,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.16,0,0,'筹码峰:')COLORWHITE;
DRAWNUMBER_FIX(1,0.22,0,0,CONST(WINNER(C)*100))COLORWHITE;
DRAWTEXT_FIX(1,0.7,0,0,'')COLORRED;
|