通达信小忙抄底未加密选股指标公式源码


来源: 网络 时间: 2022-07-16 21:52:30 人气: 43 评论: 0

通达信小忙抄底未加密选股指标公式源码

源码正文:

VAR2:=REF(LOW, 1){XG51};
VAR3:=SMA(Abs(LOW-VAR2),13, 1)/Sma(MAX(LOW-VAR2,0), 13, 1)*100{XG51};
VAR4:=ema(IF(CLOSE*1.2,VAR3*13, VAR3/13), 13){XG51};
VAR5:=LLV(LOW, 34){XG51};
VAR6:=HHV(VAR4, 34){XG51};
VAR7:=IF(LLV(LOW,56), 1, 0){XG51};
VAR8:=EMA(IF(LOW<=VAR5, (VAR4+VAR6*2)/2, 0),3)/618*VAR7{XG51};
AA:=VAR8>REF(VAR8,1){XG51};
DR:=100{XG51};
ZRQ:=3{XG51};
DJ:=REF(LLV(L, 100),3){XG51};
ZD:=REFDATE(DJ, DATE){XG51};
XG:=L=ZD{XG51};
XGA:=AA AND XG, COLORWHITE, LINETHICK2{XG51};
XG1:=XGA>REF(XGA, 1){XG51};
抄底:=XG1>REF(XG1,1)COLORWHITE, LINETHICK2{XG51};
stICKLINE(FILTER(抄底>=1, 5), 45,0, 4, 0), COLORWHITE{XG51};
DRAWTEXT(FILTER(抄底=1,5), 36, '抄底'), COLORWHITE{X!G~5-1!C!N!{};

通达信TO神器分时主图未加密选股指标公式源码

源码正文:

攻击量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN{XG51};
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0{XG51};
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0{XG51};
攻击流量:=攻击量A+攻击量B,COLORstICK{XG51};
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORWHITE,LINETHICK1{XG51};
资金攻击:=IF(攻击比>=0,(攻击比+50),100-Abs((攻击比-50))){XG51};
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORWHITE{XG51};
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00{XG51};
资金出入:=资金流入+资金流出,COLORSTICK{XG51};
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1{XG51};
资金流比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2)){XG51};
DRAWTEXT_FIX(1,0.180,0.88,0,STRCAT(STRCAT('【资金流比】',CON2STR(资金流比,2)),'%买')),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.000,0.88,0,STRCAT(STRCAT('【资金攻击】',CON2STR(资金攻击,2)),' %买')),COLORBLUE{XG51};
XG:HHV(H,480),DOTLINE,COLORWHITE{XG51};
STICKLINE(FILTER(crOSS(C,REF(XG,1)),10) AND C>REF(XG,1),C*0.99,C,8,0),COLORCYAN{XG51};
DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10) AND C>REF(XG,1),C*0.99,'突破'),COLORBLUE{XG51};
RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1{XG51};
JY:=BArslAST((RQ-REF(RQ,1))!=WEEkdAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1{XG51};
ma1:=REF(C,JY){XG51};
MA2:=REF(MA1,JY){XG51};
MA3:=REF(MA2,JY){XG51};
MA4:=REF(MA3,JY){XG51};
MA5:=REF(MA4,JY){XG51};
MA6:=REF(MA5,JY){XG51};
MA7:=REF(MA6,JY){XG51};
MA8:=REF(MA7,JY){XG51};
MA9:=REF(MA8,JY){XG51};
CK:REFDATE((C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9)/10,DATE),COLORac59FF,CIRCLEDOT{XG51};
DRAWTEXT(ISLASTBAR,CK,' 参考线'),COLOR0000FF{XG51};
dif:=(ema(CLOSE,12)-EMA(CLOSE,26))+DYnaINFO(3){XG51};
DEA:=EMA(DIF,9){XG51};
macd1:=10*(DIF-DEA){XG51};
MACD2:=EMA(MACD1,2){XG51};
STICKLINE(MACD1>=MACD2 AND MACD1>=0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR0000B4{XG51};
STICKLINE(MACD1<MACD2 AND MACD1>0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR00B400{XG51};
STICKLINE(MACD1>=MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR5151A2{XG51};
STICKLINE(MACD1<MACD2 AND MACD1<0,DYNAINFO(3),MACD1+DYNAINFO(3),0,0),COLOR88743A{XG51};
XX:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE)){XG51};
主力:=expma(CLOSE/XX,20);大户:=EXPMA(CLOSE/XX,60);散户:=EXPMA(CLOSE/XX,120){XG51};
底:=1;1.02,NODRAW;高:=1.03{XG51};
DRAWTEXT(CROSS(主力,1.02),C*0.999,'-拉升'),COLORGREEN{XG51};
DRAWICON(CROSS(主力,1.04),C,24){XG51};
DRAWTEXT(CROSS(主力,1.04),C*0.999,'-冲涨停'),COLORMAGENTA{XG51};
A1:=(vol/CLOSE)/3{XG51};
A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0){XG51};
A3:=SUM((IF(((A1>40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0){XG51};
A4:=SUM((IF(((A1<40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0){XG51};
A5:=SUM((IF(((A1<40) AND (CLOSE<(REF(CLOSE,1)))),A1,0)),0){XG51};
A6:=((A2+A3)+A4)+A5{XG51};
A7:=IF((BARSTATUS=2),((100*A2)/A6),0){XG51};
A8:=((IF((BARSTATUS=2),((100*A3)/A6),0))){XG51};
A9:=((IF((BARSTATUS=2),((100*A4)/A6),0))){XG51};
A10:=((IF((BARSTATUS=2),((100*A5)/A6),0))){XG51};
机构买盘:=(A2),LINETHICK2{XG51};
机构卖盘:=(A3),LINETHICK2{XG51};
散户买盘:=(A4){XG51};
散户卖盘:=(A5){XG51};
DRAWTEXT_FIX(1,0.0,1-0.05,0,STRCAT(STRCAT('【机构买盘】',CON2STR(机构买盘,2)),'万')),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.18,1-0.05,0,STRCAT(STRCAT('【机构卖盘】',CON2STR(机构卖盘,2)),'万')),COLOR00FF00{XG51};
DRAWTEXT_FIX(1,0.36,1-0.05,0,STRCAT(STRCAT('【散户买盘】',CON2STR(散户买盘,2)),'万')),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.54,1-0.05,0,STRCAT(STRCAT('【散户卖盘】',CON2STR(散户卖盘,2)),'万')),COLOR00FF00{XG51};
H1:=MAX(DYNAINFO(3),DYNAINFO(5)){XG51};
L1:=MIN(DYNAINFO(3),DYNAINFO(6)){XG51};
P1:=H1-L1{XG51};
阻力:=L1+P1*7/8,COLORCYAN{XG51};
支撑:=L1+P1*0.5/8,COLORLIMAGENTA{XG51};
DRAWTEXT(LONGCROSS(支撑,C,2),C,'买'),COLORBLUE{XG51};
DRAWTEXT(LONGCROSS(C,阻力,2),C,'卖'),COLORCYAN{XG51};
量价:=(VOL/CLOSE)/3{XG51};
B2:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0){XG51};
B3:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0){XG51};
B6:=B2+B3;DD1:=1;比:=B2/B3{XG51};
BBB1:=STRCAT(STRCAT('买= ',CON2STR((100*B2)/B6,0)),'%'),COLORBLUE{XG51};
BBB2:=STRCAT(STRCAT('卖= ',CON2STR((100*B3)/B6,0)),'%'){XG51};
BBB3:=STRCAT(STRCAT('差= ',CON2STR((100*(B2-B3))/B6,0)),'%'){XG51};
DRAWTEXT_FIX(DD1=1,0,0.70,0,BBB1),COLORWHITE{XG51};
DRAWTEXT_FIX(DD1=1,0,0.75,0,BBB2),COLORCYAN{XG51};
DRAWTEXT_FIX(DD1=1,0,0.80,0,BBB3),COLOR00FFFF{XG51};
市销率:=STRCAT('市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));市净率:=STRCAT('市净率: ',CON2STR(C/FINANCE(34),2)){XG51};
净资收益率:=STRCAT('净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));毛利率:=STRCAT('毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2)){XG51};
净利润率:=STRCAT('净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));主营利润率:=STRCAT('主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));利润同比:=STRCAT('利润同比: ',CON2STR(FINANCE(43),2));收入同比:=STRCAT('收入同比: ',CON2STR(FINANCE(44),2));X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;X3:=FINANCE(23)/FINANCE(10)*3.3;X4:=FINANCE(19)/FINANCE(15)*0.6;X5:=FINANCE(20)/FINANCE(15)*0.999{XG51};
Z值:=X1+X2+X3+X4+X5;预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3)))){XG51};
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3)){XG51};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));DRAWTEXT_FIX(ISLASTBAR,0.50,0.05,0,财务系数),COLORBLUE;D1:=YEAR AND MONTH AND DAY;AA1:=STRCAT(CON2STR(YEAR,0),'年'){XG51};
AA2:=STRCAT(CON2STR(MONTH,0),'月');AA3:=STRCAT(CON2STR(DAY,0),'日');AA4:=STRCAT('星期',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日'))))))){XG51};
AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'');DRAWTEXT_FIX(D1,0.888,0.001,0,AA),COLORBLACK{XG51};
MZ0:=(BARSLAST(((HOUR=9) AND (MINUTE=31)))+1){XG51};
上穿分时:IF(((SETCODE<2) AND (CONST(MZ0)<241)),CONST(IF((TIME<1000),HHV(CLOSE,0),SUM((IF((TIME=1000),1,0)*HHV(CLOSE,0)),0))),DRAWNULL)LINETHICK1,COLORLIGRAY{XG51};
底支:IF(((SETCODE<2) AND (CONST(MZ0)<241)),CONST(IF((TIME<1000),HHV(CLOSE,0),SUM((IF((TIME=1000),1,0)*LLV(CLOSE,0)),0))),DRAWNULL),LINETHICK1,COLORLIGRAY{XG51};
STICKLINE(TIME=931 OR TIME=1000,上穿分时,底支,0,-1),COLORLIGREEN;分时上突:=CROSS(C,上穿分时);上突:=C<上穿分时 AND 上穿分时>底支;DRAWICON(分时上突,C,5);股价支撑线:=MA(CLOSE,20){XG51};
底价线:股价支撑线-2*STD(CLOSE,20),NODRAW,COLORLIMAGENTA,LINETHICK2;DRAWTEXT_FIX(1,0.0001,0.00,0,STRCAT(STRCAT('【今日强势有效突破】',CON2STR(上穿分时,2)),' 元买入稳赚')),COLORRED,LINETHICK1{XG51};
DRAWTEXT_FIX(1,0.5001,0.00,0,STRCAT(STRCAT('【底部得到有效支撑】',CON2STR(底支,2)),' 元 可以参考')),COLORRED,LINETHICK1{XG51};
所属板块:=STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT(' [行业]—',HYBLOCK),STRCAT(' [地域]—',DYBLOCK)),STRCAT(' [概念]—',GNBLOCK))){XG51};
DRAWTEXT_FIX(ISLASTBAR,0.005,0.05,0,所属板块),COLORRED{XG51};
主营收入同比:=FINANCE(44){XG51};
净利润同比:=FINANCE(43){XG51};
市盈:=DYNAINFO(39){XG51};
市净:=CONST(DYNAINFO(7) / FINANCE(34)){XG51};
净利:=CONST(FINANCE(30)/FINANCE(20));
DRAWTEXT_FIX(1,0.72,0.71,0,'市盈:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.79,0.71,0,CON2STR(市盈,2)),COLORWHITE{XG51};
DRAWTEXT_FIX(1,0.72,0.77,0,'市净:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.79,0.77,0,CON2STR(市净,2)),COLORRED{XG51};
DRAWTEXT_FIX(1,0.72,0.83,0,'净利:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.79,0.83,0,CON2STR(净利,2)),COLORRED{XG51};
DRAWTEXT_FIX(1,0.72,0.89,0,'主营同比:'),COLORRED{XG51};
DRAWTEXT_FIX(1,0.79,0.89,0,STRCAT(VAR2STR(主营收入同比,0),' %')),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.72,0.95,0,'净利同比:'),COLORRED{XG51};
DRAWTEXT_FIX(1,0.79,0.95,0,STRCAT(VAR2STR(净利润同比,0),' %')),COLORBLUE{XG51};
换手:=VOL/CAPITAL*100{XG51};
五换:=MA(换手,5){XG51};
DRAWTEXT_FIX(1,0.87,0.71,0,'今换:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.91,0.71,0,STRCAT('',CON2STR(换手,2))),COLORRED{XG51};
DRAWTEXT_FIX(1,0.87,0.77,0,'五换:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.91,0.77,0,STRCAT('',CON2STR(五换,2))),COLORRED{XG51};
DRAWTEXT_FIX(1,0.87,0.83,0,'量比:'),COLORRED{XG51};
DRAWTEXT_FIX(1,0.91,0.83,0,STRCAT('',CON2STR(DYNAINFO(17),2))),COLORWHITE{XG51};
DRAWTEXT_FIX(1,0.87,0.89,0,'内盘:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.91,0.89,0,STRCAT('',CON2STR(DYNAINFO(22),0))),COLORCYAN{XG51};
DRAWTEXT_FIX(1,0.87,0.95,0,'外盘:'),COLORBLUE{XG51};
DRAWTEXT_FIX(1,0.91,0.95,0,STRCAT('',CON2STR(DYNAINFO(23),0))),COLORWHITE{X~G!5?1~C~N~{};

指标 通达信 源码

评论