通达信T0分时神器分时主图指标 源码 附图
MA30:=EMA(CLOSE,30);
强弱:EMA(CLOSE,900);
STICKLINE((MA30>强弱),MA30,强弱,0.5,0),COLOR0000FF;
STICKLINE((MA30<强弱),MA30,强弱,0.5,0),COLOR00FF00;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00DD00;
支撑:L1+P1*0.5/8,COLOR00DD00;
现价:CLOSE,COLORWHITE,LINETHICK1,NODRAW;
STICKLINE(CROSS(支撑,现价),支撑,阻力,1,0),COLORYELLOW;
涨幅:=(DYNAINFO(7)-DYNAINFO(3))/DYNAINFO(3)*100;
即时涨幅:=(C-DYNAINFO(3))/DYNAINFO(3)*100;
{MA3:="MA.MA3#DAY"(5,10,20);}
DRAWTEXT(LONGCROSS(支撑,C,2) AND 涨幅>-9.5,支撑*1.001,'买★'),COLORYELLOW;{吸}
DRAWTEXT(LONGCROSS(支撑,C,2),C,'买★'),COLOR00FFFF;
DRAWTEXT(LONGCROSS(C,强弱,2) AND 强弱>REF(强弱,1) AND 涨幅>0 AND 即时涨幅<0.5,强弱*0.998,'★卖★'),COLORRED;
DRAWTEXT(LONGCROSS(C,阻力,2),C,'★卖★'),COLORRED;{抛};
{冲涨停}
X:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE));
主力:=EXPMA(CLOSE/X,20);
大户:=EXPMA(CLOSE/X,60);
散户:=EXPMA(CLOSE/X,120);
底:=1;1.02,NODRAW;高:=1.03;
DRAWTEXT(CROSS(主力,1.02),C*0.999,'-拉升'),COLORCYAN;
DRAWICON(CROSS(主力,1.04),C,24);
DRAWTEXT(CROSS(主力,1.04),C*0.999,'-冲涨停'),COLORLIMAGENTA;
A11:=(VOL/CLOSE)/3;
A22:=SUM((IF(((A11>40) AND (CLOSE>(REF(CLOSE,1)))),A11,0)),0);
A33:=SUM((IF(((A11>40) AND (CLOSE<(REF(CLOSE,1)))),A11,0)),0);
A44:=SUM((IF(((A11<40) AND (CLOSE>(REF(CLOSE,1)))),A11,0)),0);
A55:=SUM((IF(((A11<40) AND (CLOSE<(REF(CLOSE,1)))),A11,0)),0);
A66:=((A22+A33)+A44)+A55;
A77:=IF((BARSTATUS=2),((100*A22)/A66),0);
A8:=((IF((BARSTATUS=2),((100*A33)/A66),0)));
A9:=((IF((BARSTATUS=2),((100*A44)/A66),0)));
A10:=((IF((BARSTATUS=2),((100*A55)/A66),0)));
机构买盘:=(A22),LINETHICK2;
机构卖盘:=(A33),LINETHICK2;
散户买盘:=(A44);
散户卖盘:=(A55);
DRAWTEXT_FIX(1,0.000,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),COLORRED;
DRAWTEXT_FIX(1,0.250,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00;
DRAWTEXT_FIX(1,0.500,1-0.05,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),'万')),COLORRED;
DRAWTEXT_FIX(1,0.745,1-0.05,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),'万')),COLOR00FF00;
突破:=REF(EMA(C,20),1);
A1X:=(EMA(C,10)-突破)/突破*100;
多方:IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL),COLORMAGENTA;
空方:IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),COLORBLUE;
STICKLINE(A1X>=0,多方,突破,2,0),COLORYELLOW,NODRAW;
STICKLINE(A1X<0,空方,突破,2,0),COLORBLUE,NODRAW;
CG:MA(C,21),COLOR00FF00,LINETHICK2;
FL:HHV(CG,3),COLORFF0000,LINETHICK2;
FS:CG-(FL-CG),COLORRED,LINETHICK2;
{紫底}
低A:=REF(LLV(L,150),3);
近期底:=REFDATE(低A,DATE);
最底:=REFDATE(近期底,DATE);
入:=最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O));
DRAWICON(入,L,41);{阶段底部提示}
HHA:=CONST(HHV(C,0));
LLA:=CONST(LLV(C,0));
HL:=HHA-LLA;
顶C:=HHA,COLOR545454,LINETHICK1,DOTLINE,NODRAW;
DRAWICON(C=HHA,C*1.001,35);
底C:=LLA,COLOR545454,LINETHICK1,DOTLINE,NODRAW;
DRAWICON(C=LLA,C*1.001,34);
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
MA30赋值:收盘价的30日指数移动平均
输出强弱:收盘价的900日指数移动平均
STICKLINE((MA30>强弱),MA30,强弱,0.5,0),COLOR0000FF
STICKLINE((MA30<强弱),MA30,强弱,0.5,0),COLOR00FF00
H1赋值:MAX(DYNAINFO(3),DYNAINFO(5))
L1赋值:MIN(DYNAINFO(3),DYNAINFO(6))
P1赋值:H1-L1
输出阻力:L1+P1*7/8,COLOR00DD00
输出支撑:L1+P1*0.5/8,COLOR00DD00
输出现价:收盘价,画白色,LINETHICK1,NODRAW
STICKLINE(支撑上穿现价,支撑,阻力,1,0),画黄色
涨幅赋值:(现价-DYNAINFO(3))/DYNAINFO(3)*100
即时涨幅赋值:(C-DYNAINFO(3))/DYNAINFO(3)*100
{MA3赋值:"MA.MA3#DAY"(5,10,20)
}
DRAWTEXT(LONGCROSS(支撑,C,2) AND 涨幅>-9.5,支撑*1.001,'买★'),画黄色
{吸}
DRAWTEXT(LONGCROSS(支撑,C,2),C,'买★'),COLOR00FFFF
DRAWTEXT(LONGCROSS(C,强弱,2) AND 强弱>1日前的强弱 AND 涨幅>0 AND 即时涨幅<0.5,强弱*0.998,'★卖★'),画红色
DRAWTEXT(LONGCROSS(C,阻力,2),C,'★卖★'),画红色
{抛}
{冲涨停}
X赋值:SUM(成交额,收盘价的有效数据周期数)/SUM(V*100,收盘价的有效数据周期数)
主力赋值:收盘价/X的20日指数移动平均
大户赋值:收盘价/X的60日指数移动平均
散户赋值:收盘价/X的120日指数移动平均
底赋值:1
1.02,NODRAW
高赋值:1.03
DRAWTEXT(主力上穿1.02,C*0.999,'-拉升'),画青色
DRAWICON(主力上穿1.04,C,24)
DRAWTEXT(主力上穿1.04,C*0.999,'-冲涨停'),COLORLIMAGENTA
A11赋值:(成交量/收盘价)/3
A22赋值:SUM((IF(((A11>40) AND (收盘价>(1日前的收盘价))),A11,0)),0)
A33赋值:SUM((IF(((A11>40) AND (收盘价<(1日前的收盘价))),A11,0)),0)
A44赋值:SUM((IF(((A11<40) AND (收盘价>(1日前的收盘价))),A11,0)),0)
A55赋值:SUM((IF(((A11<40) AND (收盘价<(1日前的收盘价))),A11,0)),0)
A66赋值:((A22+A33)+A44)+A55
A77赋值:IF((BARSTATUS=2),((100*A22)/A66),0)
A8赋值:((IF((BARSTATUS=2),((100*A33)/A66),0)))
A9赋值:((IF((BARSTATUS=2),((100*A44)/A66),0)))
A10赋值:((IF((BARSTATUS=2),((100*A55)/A66),0)))
机构买盘赋值:(A22), 线宽为2
机构卖盘赋值:(A33), 线宽为2
散户买盘:=(A44)
散户卖盘:=(A55)
DRAWTEXT_FIX(1,0.000,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),画红色
DRAWTEXT_FIX(1,0.250,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00
DRAWTEXT_FIX(1,0.500,1-0.05,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),'万')),画红色
DRAWTEXT_FIX(1,0.745,1-0.05,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),'万')),COLOR00FF00
突破赋值:1日前的C的20日指数移动平均
A1X赋值:(C的10日指数移动平均-突破)/突破*100
输出多方:IF(A1X>=0,REF(C的10日指数移动平均,上次A1X上穿0距今天数+1),DRAWNULL),画洋红色
输出空方:IF(A1X<0,REF(C的10日指数移动平均,上次0上穿A1X距今天数+1),DRAWNULL), 画蓝色
当满足条件A1X>=0时,在多方和突破之间画柱状线
当满足条件A1X<0时,在空方和突破之间画柱状线
输出CG:C的21日简单移动平均,COLOR00FF00, 线宽为2
输出FL:3日内CG最高值,COLORFF0000, 线宽为2
输出FS:CG-(FL-CG),画红色, 线宽为2
{紫底}
低A:=REF(150日内L最低值,3)
近期底赋值:REFDATE(低A,DATE)
最底赋值:REFDATE(近期底,DATE)
入赋值:最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O))
当满足条件入时,在L和41之间画图标
{阶段底部提示}
HHA:=CONST(0日内C最高值)
LLA赋值:CONST(0日内C最低值)
HL赋值:HHA-LLA
顶C赋值:HHA,COLOR545454,LINETHICK1,DOTLINE,NODRAW
当满足条件C=HHA时,在C*1.001和35之间画图标
底C:=LLA,COLOR545454,LINETHICK1,DOTLINE,NODRAW
当满足条件C=LLA时,在C*1.001和34之间画图标