通达信真实通道主图指标公式
2020/9/3 18:16:07
{内通道}
重心:WMA((2*C+H+L)/4,2),COLOR00FFFF,NODRAW;
UPPERS: 重心*(1+2.382/100),COLOR990099;
DRAWTEXT(ISLASTBAR,UPPERS,CON2STR(UPPERS,2)),COLOR0077FF;
LOWERS: 重心*(1-2.382/100),COLORFF0000;
DRAWTEXT(ISLASTBAR,LOWERS,CON2STR(LOWERS,2)),COLOR00FFFF;
{中通道}
VAR2:=重心*VOL;
VAR3:=(EMA(VAR2,3)/EMA(VOL,3)+EMA(VAR2,8)/EMA(VOL,8)+EMA(VAR2,13)/EMA(VOL,13)+EMA(VAR2,21)/EMA(VOL,21))/4;
UP:=VAR3*1.0809;
DN:=VAR3*0.9191;
{外通道}
VAR4:=EMA(重心,19);
LUP:=EMA(VAR4*1.119,3);
LDN:=EMA(VAR4*0.881,3);
UPK:=UP-UPPERS;
UPL1:=LUP-UP;
UPD:=LOWERS-DN;
UPL:=DN-LDN;
{7}DRAWBAND(IF(UP>UPPERS,UPPERS,UPPERS+UPK),RGB(230,0,50),UPPERS+UPK,RGB(230,0,50));
DRAWBAND(IF(UP<LUP,UP,UP+UPL1),RGB(80,0,80),UP+UPL1,RGB(80,0,80));
DRAWBAND(IF(LOWERS>DN,LOWERS,LOWERS-UPD),RGB(0,230,30),LOWERS-UPD,RGB(0,230,30));
DRAWBAND(IF(DN>LDN,DN,DN-UPL),RGB(0,80,50),DN-UPL,RGB(0,80,50));
{6}DRAWBAND(IF(UP>UPPERS,UPPERS,UPPERS+UPK*0.8),RGB(220,0,180),UPPERS+UPK*0.8,RGB(220,0,180));
DRAWBAND(IF(UP<LUP,UP,UP+UPL1*0.8),RGB(100,0,120),UP+UPL1*0.8,RGB(100,0,120));
DRAWBAND(IF(LOWERS>DN,LOWERS,LOWERS-UPD*0.8),RGB(0,200,55),LOWERS-UPD*0.8,RGB(0,200,55));
DRAWBAND(IF(DN>LDN,DN,DN-UPL*0.8),RGB(0,100,80),DN-UPL*0.8,RGB(0,100,80));
{5}DRAWBAND(IF(UP>UPPERS,UPPERS,UPPERS+UPK*0.6),RGB(200,0,150),UPPERS+UPK*0.6,RGB(200,0,150));
DRAWBAND(IF(UP<LUP,UP,UP+UPL1*0.6),RGB(120,0,150),UP+UPL1*0.6,RGB(120,0,150));
DRAWBAND(IF(LOWERS>DN,LOWERS,LOWERS-UPD*0.6),RGB(0,150,100),LOWERS-UPD*0.6,RGB(0,150,100));
DRAWBAND(IF(DN>LDN,DN,DN-UPL*0.6),RGB(0,120,100),DN-UPL*0.6,RGB(0,120,100));
{4}DRAWBAND(IF(UP>UPPERS,UPPERS,UPPERS+UPK*0.5),RGB(180,0,100),UPPERS+UPK*0.5,RGB(180,0,100));
DRAWBAND(IF(UP<LUP,UP,UP+UPL1*0.5),RGB(150,0,180),UP+UPL1*0.5,RGB(150,0,180));
DRAWBAND(IF(LOWERS>DN,LOWERS,LOWERS-UPD*0.4),RGB(0,100,100),LOWERS-UPD*0.4,RGB(0,100,100));
DRAWBAND(IF(DN>LDN,DN,DN-UPL*0.4),RGB(0,150,150),DN-UPL*0.4,RGB(0,150,150));
{3}DRAWBAND(IF(UP>UPPERS,UPPERS,UPPERS+UPK*0.4),RGB(150,0,80),UPPERS+UPK*0.4,RGB(150,0,80));
DRAWBAND(IF(UP<LUP,UP,UP+UPL1*0.4),RGB(180,0,220),UP+UPL1*0.4,RGB(180,0,220));
{2}DRAWBAND(IF(LOWERS>DN,LOWERS,LOWERS-UPD*0.2),RGB(0,80,80),LOWERS-UPD*0.2,RGB(0,80,80));
DRAWBAND(IF(DN>LDN,DN,DN-UPL*0.2),RGB(0,180,180),DN-UPL*0.2,RGB(0,180,180));
DRAWBAND(IF(UP>UPPERS,UPPERS,UPPERS+UPK*0.2),RGB(120,0,50),UPPERS+UPK*0.2,RGB(120,0,50));
DRAWBAND(IF(UP<LUP,UP,UP+UPL1*0.2),RGB(200,0,255),UP+UPL1*0.2,RGB(200,0,255));
{1}DRAWBAND(IF(LOWERS<UPPERS,UPPERS,LOWERS),RGB(40,30,20),LOWERS,RGB(40,30,20));
{K线}
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),COLORRED;
STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),COLORCYAN;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00CC00,;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),OPEN,CLOSE,0,0),COLORRED;
STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),OPEN,CLOSE,0,0),COLORCYAN;
{红股.绿币的趋势线}
MA5:WMA(重心,5),COLOR00FF00,DOTLINE;
IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLOR0055FF,LINETHICK2;
看 股吧公式 www.kan guba.com
其它股票公式列表