通达信天平称主图指标公式
2020/6/12 17:58:09
区域值:=250;移动值:=50;
{主图区域显示}
K:=BARSLAST(CURRBARSCOUNT=区域值);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,K),0));
DD:=CONST(IF(ISLASTBAR=1,LLV(L,K),0));
高:IF(CURRBARSCOUNT<=区域值,GD,DRAWNULL),COLOR00FF00,POINTDOT;
低:IF(CURRBARSCOUNT<=区域值,DD,DRAWNULL),COLOR00FF00,POINTDOT;
STICKLINE(CURRBARSCOUNT=区域值,GD,DD,0,-1),COLOR00FF00;
STICKLINE(CURRBARSCOUNT=1,GD,DD,0,-1),COLOR00FF00;
{天平称主图显示}
A:=CONST(REF(C,移动值));
阳阳:DRAWLINE(C=A AND K,A,C=A AND K ,A,0),LINETHICK3,COLORMAGENTA;
{STICKLINE(C=A AND K,GD,DD,0,-1),COLORMAGENTA;}
BB:COUNT(C=A AND K,区域值),NODRAW;
CC:=IF(BB=1,BARSLAST(C=A),DRAWNULL);
DD1:=BACKSET(C=A AND BB=2,2+REF(CC,1)/2);
DRAWICON(C=A AND BB=1,A*1.01,16);
DRAWICON(CROSS(DD1,0.5),A*0.99,18);
DRAWICON(C=A AND BB=2,A*1.01,16);
{预测主图显示}
XX:=(GD+DD-2*A);
IF(CURRBARSCOUNT<=区域值 AND BB>=2,A-0.618*XX,DRAWNULL);
IF(CURRBARSCOUNT<=区域值 AND BB>=2,A-1.618*XX,DRAWNULL);
IF(CURRBARSCOUNT<=区域值 AND BB>=2,A-2.618*XX,DRAWNULL);
IF(CURRBARSCOUNT<=区域值 AND BB>=2,A+0.618*XX,DRAWNULL);
IF(CURRBARSCOUNT<=区域值 AND BB>=2,A+1.618*XX,DRAWNULL);
IF(CURRBARSCOUNT<=区域值 AND BB>=2,A+2.618*XX,DRAWNULL);
DRAWTEXT(CURRBARSCOUNT=区域值/2,GD*0.95,'★ 天平称主图 ★'),LINETHICK5,COLOR00FFFF;
看股吧公 式 ww w.kanguba.com
其它股票公式列表