通达信四分主图指标公式
2020/5/19 18:03:20
将百分线与自适应双均线巧妙结合。方便实用。p为可调参数,默认为64,可以根据具体个股与指数自己设置。举例如下:上证指数在默认参数下,可知如下信息低点与高点相距34天,故而均线jx自动调整为34天均线,而均线dx为0.25倍周期的短线均线。此两条均线组合为双均线系统可以完美诠释均线交叉的内在特性。颇具实战参考意义图中k线乃macd指标定义。红色表示macd金叉区域,趋势安全,安心持有。绿色表示macd死叉区域,趋势有变。注意了结。
P:=64;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.8,0,HYBLOCK),COLOR00FF00;
DRAWTEXT_FIX(ISLASTBAR,0.75,0.8,0,DYBLOCK),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.9,0,GNBLOCK),COLORYELLOW;
{以上为显示所属板块,地域,概念等}
EE:=CURRBARSCOUNT<=P;
高:=HHV(H,P);
低:=LLV(L,P);
相对:(C-低)/(高-低)*100,NODRAW,COLORFFFF00;
区间:(高-低)/低*100,NODRAW,COLORWHITE;
天:=CONST(高)COLORYELLOW;
地:=CONST(低)COLOR00FF00;
强:=CONST(高*3/4+低*1/4);
中:=CONST(高*1/2+低*1/2);
弱:=CONST(高*1/4+低*3/4);
STICKLINE(EE,天,天,5,0),COLORYELLOW;
STICKLINE(EE,地,地,5,0),COLOR00FF00;
STICKLINE(EE,强,强,1,0),COLORFFFF00;
STICKLINE(EE,中,中,5,0),COLORWHITE;
STICKLINE(EE,弱,弱,1,0),COLOR0099FF;
DT:=H=天;
DL:=L=地;
高T:=BARSLAST(DT)+1;
低T:=BARSLAST(DL)+1;
STICKLINE(EE AND DT,天,地,0,0),COLORRED;
STICKLINE(EE AND DL,天,地,0,0),COLOR00FF00;
{www.kanguba.com 看股吧_通达信股票指标公式}
间隔:ABS(高T-低T),COLOR00FF00,NODRAW;
PT:=CONST(间隔);
JX:MA(C,PT),COLORWHITE,LINETHICK2;
DX:MA(C,PT*0.25),COLORYELLOW,LINETHICK1;
AB:=EMA(C,12);
BB:=EMA(C,26);
AO:=(AB-BB);
XH:=EMA(AO,9);
AC:=2*(AO-XH);
KK:=IF(AC>0, 5,-5);
STICKLINE(KK=5,H,L,0.2,0),COLORRED;
STICKLINE(KK=5 AND C>=O,C,O,3,1),COLORRED;
STICKLINE(KK=5 AND C<O,C,O,3,0),COLORRED;
STICKLINE(KK=-5,H,L,0.2,0),COLOR00CC00;
STICKLINE(KK=-5 AND C>=O,C,O,3,1),COLOR00CC00;
STICKLINE(KK=-5 AND C<O,C,O,3,0),COLOR00CC00;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.9,O,C,1,0),COLOR0099FF;
STICKLINE(ZDF<-9.9,O,C,1,0),COLORBLUE;
{以上为macd指标定义K线,红色表示金叉区域,绿色为死叉}
DRAWICON(CROSS(DX,JX),JX,1);
DRAWICON(CROSS(JX,DX),JX,2);
IF(JX>REF(JX,1),JX,DRAWNULL),COLORRED,LINETHICK2;
IF(DX<REF(DX,1),DX,DRAWNULL),COLOR00FF00,LINETHICK1;
DRAWNUMBER(ISLASTBAR,天,天),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,地,地),COLOR00FF00;
DRAWNUMBER(ISLASTBAR,强,强),COLORFFFF00;
DRAWNUMBER(ISLASTBAR,中,中),COLORWHITE;
DRAWNUMBER(ISLASTBAR,弱,弱),COLOR0099FF;
看股吧公 式 ww w.kanguba.com
其它股票公式列表