以下是通达信分时主图公式
通达信分时主图公式
{通达信分时主图用}
ZSR:=DYNAINFO( 3);
GDK:=(SMA(C,2,1)-SMA(C,6,1))*2.1;
STICKLINE(GDK>0,ZSR,ZSR+GDK,0,-1) ,COLOR5151A2;
STICKLINE(GDK<=0,ZSR,ZSR+GDK,0,-1) ,COLOR74743A;
STICKLINE(GDK>0 ,ZSR+GDK*0.05,ZSR+GDK*0.15,0,-1) ,COLOR0077FF;
STICKLINE(GDK>0 ,ZSR+GDK*0.2,ZSR+GDK*0.35,0,-1) ,COLOR0088FF;
STICKLINE(GDK>0 ,ZSR+GDK*0.4,ZSR+GDK*0.55,0,-1) ,COLOR0099FF;
STICKLINE(GDK>0 ,ZSR+GDK*0.6,ZSR+GDK*0.75,0,-1) ,COLOR00CCFF;
STICKLINE(GDK>0 ,ZSR+GDK*0.8,ZSR+GDK*0.95,0,-1) ,COLOR00DDDD;
STICKLINE(GDK>0 ,ZSR+GDK*0.86,ZSR+GDK*0.999,0,-1) ,COLOR00FFFF;
STICKLINE(GDK<=0 ,(ZSR+GDK*0.05),(ZSR+GDK*0.15),0,-1) ,COLOR006600;
STICKLINE(GDK<=0 ,(ZSR+GDK*0.2),(ZSR+GDK*0.35),0,-1) ,COLOR009900;
STICKLINE(GDK<=0 ,(ZSR+GDK*0.4),(ZSR+GDK*0.55),0,-1) ,COLOR00CC00;
STICKLINE(GDK<=0 ,(ZSR+GDK*0.6),(ZSR+GDK*0.75),0,-1) ,COLOR00FF00;
STICKLINE(GDK<=0 ,(ZSR+GDK*0.8),(ZSR+GDK*0.95),0,-1) ,COLOR55FF00;
STICKLINE(GDK<=0 ,(ZSR+GDK*0.86),(ZSR+GDK*0.999),0,-1) ,COLOR99FF00;
DRAWTEXT_FIX(1,0.09,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.15,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.21,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.27,0,0,DYBLOCK)COLOR00FFFF;
AAA:DYNAINFO(5),COLORDDAADD,LINETHICK1;{最高} BBB:DYNAINFO(6),COLOR888800,LINETHICK1;{最低} CCC:=AAA-BBB;中G:(AAA+BBB)/2,COLOR999999,LINETHICK1;{中}
上顶:BBB+CCC*7/8,COLOR008800,DOTLINE;
阻力:BBB+CCC*2/3,COLOR777700,DOTLINE;
支撑:BBB+CCC/3,COLOR777700,DOTLINE;
下底:BBB+CCC*1/8,COLOR447777,DOTLINE;
JJA:C,COLOR999999,LINETHICK2;
DRAWNUMBER(CURRBARSCOUNT=12,AAA*0.9995,AAA),COLORFFAAFF;
DRAWNUMBER(CURRBARSCOUNT=12,BBB,BBB),COLORDDDD00;
DRAWNUMBER(CURRBARSCOUNT=12,中G,中G),COLORDDDDDD;
DRAWNUMBER(CURRBARSCOUNT=12,上顶,上顶),COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=12,阻力,阻力),COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=12,支撑,支撑),COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=12,下底,下底),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=20,AAA*0.9995,'ZG:'),COLORFFAAFF;
DRAWTEXT(CURRBARSCOUNT=20,BBB,'ZD:'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=20,上顶,'SD:'),COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=20,阻力,'ZL:'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=20,支撑,'ZC:'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=20,下底,'XD:'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=20,中G,'PH:'),COLOREEEEEE;
{JJ:SUM(C*V,0)/SUM(V,0),COLOR00FFFF;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
GB:IF(RSI1>80,H*1.0005,DRAWNULL),CIRCLEDOT,LINETHICK5,COLORFFFF00;
GBB:IF(RSI1>84,H*1.0008,DRAWNULL),CROSSDOT,LINETHICK3,COLOR0000FF;};
评论(0)