通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信波段王指标公式主图
DRAWBAND(MA(CLOSE,5),RGB(100,0,0),MA(CLOSE,20),RGB(0,100,0));
DRAWKLINE(H,O,L,C);
PM:MA(C,5),COLORGRAY,LINETHICK1;
IF(PM
IF(PM>=REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
A:=MA(CLOSE,12)+ABS(MA(CLOSE,12)-REF(MA(CLOSE,12),1));
B:=MA(CLOSE,12)+MA(CLOSE,12)-REF(MA(CLOSE,12),1);
分⽔岭:=IF(MA(CLOSE,12)
操作线:=分⽔岭-(EMA(C,3)-分⽔岭);
AA:=CROSS(分⽔岭,操作线);
STICKLINE(AA,C,O,3,0),COLOR0000AA;
STICKLINE(AA,C,O,2,0),COLOR0033CC;
STICKLINE(AA,C,O,1,0),COLOR0055EE;
STICKLINE(AA,C,O,0.3,0),COLOR0099FF;
STICKLINE(AA,H,L,0,1),COLOR0099FF;
RR:=CROSS((MA(VOL,5)),(MA(VOL,10)))ANDMA(C,2)>=MA(C,4);{ANDVOL>=REF(VOL,1)}
STICKLINE(RR,C,O,3,0),COLOR0000AA;
STICKLINE(RR,C,O,2,0),COLOR0033CC;
STICKLINE(RR,C,O,1,0),COLOR0055EE;
STICKLINE(RR,C,O,0.3,0),COLOR0099EE;
STICKLINE(RR,H,L,0,1),COLOR0099FF;
MA5:MA(CLOSE,5),NODRAW;
MA20:MA(CLOSE,20),COLORFFCC66,LINETHICK2;
DRAWICON(CROSS(PM,MA20),L*0.9998,9)
趋势线:MA(C,30),DOTLINECOLORFF00CC;
IF(趋势线>=REF(趋势线,1),趋势线,DRAWNULL),DOTLINE,COLORYELLOW;
回归斜率线A:EMA(SLOPE(C,21)*20+C,42);
回归斜率线B:REF(回归斜率线A,2);
IF(回归斜率线A>REF(回归斜率线A,1),回归斜率线A,DRAWNULL),COLORRED;
IF(回归斜率线A<REF(回归斜率线A,1),回归斜率线
A,DRAWNULL),COLORGREEN;
IF(回归斜率线B>REF(回归斜率线B,1),回归斜率线B,DRAWNULL),COLORRED;
IF(回归斜率线B<REF(回归斜率线B,1),回归斜率线
B,DRAWNULL),COLORGREEN;
经典RL:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
经典K:=SMA(经典RL,3,1);经典D:=SMA(经典K,3,1);经典J:=3*经典K-2*经典D;
MAHL1:=100*((EMA((H+L)/2,3)-LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,
20)))/(LLV(EMA((H+L)/2,5),30)-(EMA(H,20)-EMA(L,20))));
MAHL2:=IF(EMA(C,2)>回归斜率线AAND
MAHL1>0,EMA(C,3),LLV(EMA((H+L)/2,5),30));{A}
MAHL3:=IF(EMA(C,2)>回归斜率线AAND
MAHL1>0,LLV(EMA((H+L)/2,5),30),EMA(C,5));{A}
{回归斜率带:DRAWBAND(回归斜率线A,RGB(235,0,230),REF(回归斜率线
A,2),RGB(0,104,154));}
{C>昨C红K柱+C>O红K柱C>昨C红K柱C=昨C是跟白色24线
C<昨C蓝K柱+C>O红K柱C<昨C蓝K柱}
{STICKLINE(CLOSE>REF(CLOSE,1),HIGH,LOW,0,0),COLORRED;
STICKLINE(C<OANDC>REF(C,1),C,O,3,0),COLORFFCC00;}
{STICKLINE(CLOSE>REF(CLOSE,1)AND
C>O,OPEN,CLOSE,2.1,0),COLOR000099;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLOR0000BB;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLOR0000DD;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLOR0000FF;}
STICKLINE(CLOSE=REF(CLOSE,1),H,L,3,1),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),HIGH,LOW,0,0),COLORWHITE;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR555555;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR777777;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORBBBBBB;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORDDDDDD;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORFFFFFF;
{STICKLINE(CLOSE<REF(CLOSE,1),HIGH,LOW,0,1),COLORCYAN;
STICKLINE(C<REF(C,1)ANDC>O,C,O,3,0),COLORFFCC00;
STICKLINE(C<REF(C,1)ANDC<O,OPEN,CLOSE,3,0),COLOR990000;
STICKLINE(C<REF(C,1)ANDC<O,OPEN,CLOSE,2.7,0),COLORCC0000;
STICKLINE(CLOSE<REF(C,1),OPEN,CLOSE,2.1,0),COLORFF4400;
STICKLINE(CLOSE<REF(C,1),OPEN,CLOSE,1.5,0),COLORFF8800;
STICKLINE(CLOSE<REF(C,1),OPEN,CLOSE,0.9,0),COLORFFCC00;}
{经典KDJ买:IF(CROSS(经典K,经典
D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;
经典KDJ买:IF(CROSS(经典K,经典
D),(L-(H-L)/2),DRAWNULL),POINTDOT,LINETHICK6,COLOR0000FF;}
DRAWICON(CROSS(经典K,经典D),L*0.96,26);
{高亮红}
回归斜率买:IF(CROSS(EMA(C,3),回归斜率线
A),(L-(H-L)/3),DRAWNULL),POINTDOT,COLOR0000FF;{高亮红}
回归斜率买_:DRAWICON(CROSS(EMA(C,3),回归斜率线A),L*0.98,1),{买};
回归斜率卖:IF(CROSS(回归斜率线
A,EMA(C,2)),(H+(H-L)/3),DRAWNULL),POINTDOT,COLOR00CF00;{中绿}卖:DRAWICON(CROSS(回归斜率线A,EMA(C,2)),H*1.03,2);
经典KDJ卖:IF(CROSS(经典D,经典
K),(H+(H-L)/2),DRAWNULL),CROSSDOT,LINETHICK3,COLOR00CF00;{中绿};
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:=3*K-2*D;
X2:=LLV(J,2)=LLV(J,8);
{DRAWTEXT(CROSS(J,REF(J+0.01,1))ANDX2ANDJ<20,LOW*0.99,'★买
'),COLORYELLOW;}
DRAWICON(CROSS(J,REF(J+0.01,1))ANDX2ANDJ<20,LOW*0.99,23);
VAR6:=REF(C,1);
VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(ABS(C-VAR6),6,1)*100;
DRAWTEXT(CROSS(84,VAR7),H*1.01,'逃顶'),COLORYELLOW;
AA:=(REF(H,1)-MAX(REF(C,1),REF(O,1)))/(REF(H,1)-REF(L,1))>0.6AND
(MIN(O,C)-L)/(H-L)>0.6ANDVOL<REF(VOL,1);
DRAWTEXT(AA,L*0.99,'揉搓'),COLORRED;
C3:=REF(C,1);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,3,0),COLORBLUE;
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
{DRAWTEXT(跌停,H+0.1,'跌停'),COLORGREEN;}
涨停:=IF(REF(C,1)*1.095-C<0.01,1,0);
STICKLINE(涨停,OPEN,CLOSE,3,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORYELLOW;
{DRAWTEXT(涨停,L-0.1,'板'),COLORYELLOW;}
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超BOR大BOR中BOR小BOR超SOR大SOR中SOR小
S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗
进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗
进)*250/DAZHIV))-20,30,950,IF(CONST(大宗
进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗
出)*250/DAZHIV))-20,62,950,IF(CONST(大宗
出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗
进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗
进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗
出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗
出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;
M1:=EMA(EMA(C,21),3);
M2:=EMA(EMA(C,34),3);
TT2:=CROSS(C,M1)ANDCROSS(C,M2);
DRAWTEXT(TT2,L*0.96,'阳');
四方力道
{四方力道}
V1:=DMA((((HIGH+LOW)+(CLOSE*2))/4.15),0.9);
HY1:=REF(EMA(V1,3),1);
实时线:MA(CLOSE,1),COLOR006400;
神秘线:HY1,COLOR400080;
DRAWTEXT(CROSS(CLOSE,HY1),LOW*0.95,'B'),LINETHICK2,COLORYELLOW;
DRAWTEXT(CROSS(HY1,CLOSE),HIGH*1.08,'S'),LINETHICK3,COLORWHITE;
APP:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));
ZL:=IF((CLOSE>OPEN),(APP*(HIGH-LOW)),IF((CLOSE<OPEN),(APP*
((HIGH-OPEN)+(CLOSE-LOW))),(VOL/2)));
SF:=IF((CLOSE>OPEN),(0-(APP*((HIGH-CLOSE)+(OPEN-
LOW)))),IF((CLOSE<OPEN),(0-(APP*(HIGH-LOW))),(0-(VOL/2))));
库存能量:=MA((ZL+SF),2);
二、通达信波段为王主图指标公式
AAA:=(MA(CLOSE,13)+MA(CLOSE,17))/2;
CCC:=(STD(CLOSE,13)+STD(CLOSE,17))/2;
BBB:=AAA+2.1*CCC;
DDD:=AAA+0.72*CCC;
ZZZ:=IF(CCC>1.88,MA(DDD,3),DDD);
平衡:ZZZ;
止赢:ZZZ*1.1;
了结:ZZZ*1.05;
回档:ZZZ*0.95;
反弹:ZZZ*0.9;
DRAWTEXT(L<=反弹ANDC>OANDC>反弹,L*0.98,'买'),COLORYELLOW;
DRAWTEXT(L<=止赢ANDH>=止赢ANDC<OAND(REF(C,1)-C)/C>0.02,H*1.02,'卖
'),COLORGREEN;
STICKLINE(L<=反弹ANDC>OANDC>反弹,O,C,2,0),COLORYELLOW;
STICKLINE(L<=止赢ANDH>=止赢AND
(REF(C,1)-C)/C>0.02,O,C,2,0),COLORGREEN;
AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/
(HHV(HIGH,30)-LLV(LOW,30))*100,8);
BA:=EMA(AB,5);
A1{高}:=REFDATE(REF(HHV(H,96),5),DATE);
B1{低}:=REFDATE(REF(LLV(L,96),5),DATE);
D{中}:=((A1)+(B1))/2;
五:MA(C,5)LINETHICK2,COLOR00FFFF;
二O:EMA(C,20),COLORMAGENTA;
空仓:IF(AB-BA<0,五,DRAWNULL),LINETHICK2,COLOR00FFFF;
持仓:IF(AB-BA>0,五,DRAWNULL),,LINETHICK2,COLORRED;
箱顶:IF(AB>0ANDAB-BA<=0,A1,A1),LINETHICK3,COLOR00FF00;
箱腰:IF(AB>0ANDAB-BA<=0,D,D),LINETHICK3,COLOR00FF00;
箱低:IF(AB>0ANDAB-BA<=0,B1,B1),LINETHICK3,COLOR00FF00;
五:IF(CURRBARSCOUNT=6,L*0.992-0.02,DRAWNULL),
CROSSDOT,COLORWHITE,LINETHICK3;{五日转点}十:IF(CURRBARSCOUNT=11,L*0.992-0.02,DRAWNULL),
CROSSDOT,COLORYELLOW,LINETHICK3;{十日转点}
二十:IF(CURRBARSCOUNT=21,L*0.992-0.02,DRAWNULL),
CROSSDOT,COLORRED,LINETHICK3;{二十日转点};
三十:IF(CURRBARSCOUNT=31,L*0.992-0.02,DRAWNULL),
CROSSDOT,COLORCYAN,LINETHICK3;{三十日转点};
六十:IF(CURRBARSCOUNT=61,L*0.992-0.02,DRAWNULL),
CROSSDOT,COLORYELLOW,LINETHICK3;{六十日转点};
九十:IF(CURRBARSCOUNT=91,L*0.992-0.02,DRAWNULL),
CROSSDOT,COLORYELLOW,LINETHICK3;{九十日转点};
高1:IF(AB>0ANDABBA>0,A1,DRAWNULL),LINETHICK3,COLORRED;
中1:IF(AB>0ANDAB-BA>0,D,DRAWNULL),LINETHICK3,COLORRED;
低1:IF(AB>0
AB-BA>0,B1,DRAWNULL),LINETHICK3,COLORRED;
[源码注释]通达信公式动态翻译结果
VAR4赋值:收盘价的5日简单移动平均
VAR5赋值:收盘价的10日简单移动平均
VAR6赋值:收盘价的30日简单移动平均
VARA赋值:(((收盘价*成交量(手))*100)的4日累和 / (成交量(手)*100)的4日累和)
VARB赋值:((VARA*100)的整数部分 / 100)
VARC赋值:(((收盘价*成交量(手))*100)的7日累和 / (成交量(手)*100)的7日累和)
VARD赋值:((VARC*100)的整数部分 / 100)
VARE赋值:(((收盘价*成交量(手))*100)的28日累和 / (成交量(手)*100)的28日累和)
VARF赋值:((VARE*100)的整数部分 / 100)
短线趋势赋值:(收盘价的5日指数移动平均 – 收盘价的10日指数移动平均)
中线趋势赋值:短线趋势的9日指数移动平均
VAR14赋值:1日前的中线趋势
VAR15赋值:中线趋势
VAR16赋值:(VAR15 – VAR14)
VAR17赋值:1日前的短线趋势
VAR18赋值:短线趋势
VAR19赋值:(VAR18 – VAR17)
VAR1A赋值:开盘价
VAR1B赋值:收盘价
游资入柱赋值:VAR1A <VAR4 AND VAR1A < VAR5 AND VAR1A < VAR6 AND VAR1B > VAR4 AND VAR1B > VARF AND VAR16 > 0 AND VAR19 >0,NODRAW,画洋红色
WY1001赋值:(2*收盘价+最高价+最低价)/3
WY1002赋值:WY1001的3日指数移动平均
WY1003赋值:WY1002的3日指数移动平均
WY1004赋值:WY1003的3日指数移动平均
XYS0赋值:(WY1004-1日前的WY1004)/1日前的WY1004*100
XYS1赋值:XYS0的1日简单移动平均
XYS2赋值:XYS0的2日简单移动平均,画黄色
当满足条件游资入柱>0ANDCROSS(XYS1,XYS2)时,在0和5位置之间画柱状线,宽度为3,0不为0则画空心柱.,画洋红色
推荐阅读:通达信短线王副图指标公式
趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1),COL
ORYELLOW;
DRAWBAND(趋势,RGB(155,50,50),50,RGB(0,100,50));
{STICKLINE(趋势>50,趋势,50,6,0),COLORFF00FF;
STICKLINE(趋势<50,趋势,50,6,0),COLORGREEN;}
转强:IF(趋势>50,趋势,DRAWNULL),COLOR0000FF;
转弱:IF(趋势<50,趋势,DRAWNULL),COLORGREEN;
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);
DEA:=EMA(DIFF,6);
MACD:=2*(DIFF-DEA);
转点:=IF(K>DANDCCI>0ANDDIFF>DEAANDMACD>0,1,0);
STICKLINE(转点=1,50,50,2,0),COLORYELLOW;
STICKLINE(转点=0,50,50,2,0),COLORCYAN;
STICKLINE(C,90,90,1,0),COLORYELLOW;
STICKLINE(C,10,10,1,0),COLORCYAN;
判断:SMA(趋势,3,1),COLORYELLOW;
IF(判断>50AND趋势>判断,判断,DRAWNULL),COLORYELLOW,LINETHICK2;
IF(判断<50AND趋势>判断,判断,DRAWNULL),COLORFF00FF;
IF(判断>50AND趋势<判断,判断,DRAWNULL),COLORGREEN,LINETHICK2;
风险区:80,COLORFF85FF,POINTDOT;
安全区:20,COLORYELLOW,POINTDOT;
顶部:90,COLORFFFF00;
强弱线:50,COLORGREEN,POINTDOT;
DRAWICON(CROSS(趋势,判断)AND趋势<80,判断,1);
DRAWICON(CROSS(趋势,顶部),顶部,2);
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2:=SMA(VAR1,9,1)+100;
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1)+100;
VAR6:=VAR5-VAR2;
趋势1:IF(VAR6>45,VAR6-45,0),COLOR00FFFF;
VAR2Q:=REF(LOW,1);
VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;
VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3);
VAR5Q:=LLV(LOW,30);
VAR6Q:=HHV(VAR4Q,30);
VAR7Q:=IF(MA(CLOSE,58),1,0);
VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;
火焰山:=IF(VAR8Q>100,100,VAR8Q);
STICKLINE(火焰山>0,0,火焰山*1.2,3,0),COLOR4444FF;
STICKLINE(火焰山>0,0,火焰山*1.2,2,0),COLOR7777FF;
STICKLINE(火焰山>0,0,火焰山*1.2,1,0),COLOR9999FF;
STICKLINE(REF(趋势1,1)<趋势1,趋势1,REF(趋势1,1),3,0),COLOR000033;
STICKLINE(REF(趋势1,1)<趋势1,趋势1,REF(趋势1,1),2,0),COLOR000077;
STICKLINE(REF(趋势1,1)<趋势1,趋势1,REF(趋势1,1),1.5,0),COLOR0000BB;
STICKLINE(REF(趋势1,1)<趋势1,趋势1,REF(趋势1,1),1,0),COLOR0000DD;
STICKLINE(REF(趋势1,1)>趋势1,趋势1,REF(趋势1,1),3,0),COLOR003300;
STICKLINE(REF(趋势1,1)>趋势1,趋势1,REF(趋势1,1),2,0),COLOR007700;
STICKLINE(REF(趋势1,1)>趋势1,趋势1,REF(趋势1,1),1,0),COLOR00DD00;
逃顶:=CROSS(82,RSI);
STICKLINE(逃顶,逃顶,20,3,0),COLORFF5500;
STICKLINE(逃顶,逃顶,30,2,0),COLORFF8800;
STICKLINE(逃顶,逃顶,30,1,0),COLORFFAA00;
STICKLINE(逃顶,逃顶,30,0.5,0),COLORFFCC00;
D1:=(C+L+H)/3;
D2:=EMA(D1,6);
D3:=EMA(D2,5);
BBUY:=CROSS(D2,D3);
DRAWICON(BBUY,10,1);
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*
100;
DRAWICON(CROSS(82,VARR1),10,2);
神奇线选股:(CROSS(趋势,判断)AND趋势<80),LINETHICK0;
波段选股:(BBUY),LINETHICK0;
STICKLINE(神奇线选股AND波段选股,0,100,1,0),COLORWHITE;
DRAWTEXT_FIX(1,0.005,0,0,'所属风格:'),COLORRED;
DRAWTEXT_FIX(1,0.06,0,0,FGBLOCK),COLORRED;
DRAWTEXT_FIX(1,0.005,0.06,0,'所属概念:'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.06,0.06,0,GNBLOCK),COLORMAGENTA;
DRAWTEXT_FIX(1,0.005,0.12,0,'所属板块:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.06,0.12,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.11,0.12,0,HYBLOCK),COLORYELLOW;
YSTB:=STRCAT(CON2STR(FINANCE(44)/1,2),'%');
LRTB:=STRCAT(CON2STR(FINANCE(43)/1,2),'%');
DRAWTEXT_FIX(1,0.7,0,0,'营收同⽐:'),COLORWHITE;
DRAWTEXT_FIX(1,0.76,0,0,YSTB),COLORWHITE;
DRAWTEXT_FIX(1,0.84,0,0,'利润同⽐:'),COLORWHITE;
DRAWTEXT_FIX(1,0.9,0,0,LRTB),COLORWHITE;
净资收益率:=(FINANCE(33)/FINANCE(34)*100);
主营利润率:=(FINANCE(23)/FINANCE(20)*100);
主营业增长率:=FINANCE(44);
每股净资产:=CONST(FINANCE(34));
每股收益:=CONST(FINANCE(38));
净利润增长率:=FINANCE(43);
市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));
现⾦负债⽐:=(FINANCE(25)/FINANCE(15));
每股未分配:=CONST(FINANCE(32));
每股公积⾦:=CONST(FINANCE(18));
SY01:=净资收益率>3;
SY02:=净资收益率>0.01AND净资收益率<=3;
SY03:=主营利润率>2;
SY04:=主营利润率>0;
SY05:=主营业增长率>1;
SY06:=主营业增长率>0;
SY07:=净利润增长率>2;
SY08:=净利润增长率>0.2;
SY09:=每股收益>0.01;
SY10:=每股收益>0.001;
SY11:=每股净资产>2;
SY12:=每股净资产>0.01;
SY13:=每股未分配>0.5;
SY14:=每股未分配>0.001;
SY15:=每股公积⾦>0.5;
SY16:=每股公积⾦>0.002;
SY17:=每股未分配>=2AND每股公积⾦>=2;
SY18:=每股未分配<2OR每股公积⾦<2;
优秀:=SY01ANDSY03ANDSY05ANDSY07ANDSY09ANDSY11
ANDSY13ANDSY15;
较好:=SY02ANDSY04ANDSY06ANDSY08ANDSY10ANDSY12
ANDSY14ANDSY16;
⼀般:=NOT(优秀)ANDNOT(较好);
DRAWTEXT_FIX(优秀AND较好=0,0.7,0.05,0,'综合评估基本⾯:优秀!'),COLORMAGENTA;
DRAWTEXT_FIX(较好,0.7,0.05,0,'综合评估基本⾯:较好!'),COLORRED;
DRAWTEXT_FIX(⼀般,0.7,0.05,0,'综合评估基本⾯:⼀般!'),COLORGREEN;
DRAWTEXT_FIX(SY17,0.84,0.05,0,'是否具备⾼送转潜⼒:是!'),COLORMAGENTA;
DRAWTEXT_FIX(SY18,0.84,0.05,0,'是否具备⾼送转潜⼒:否!'),COLORGREEN;
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA60:MA(CLOSE,60);
BB:=REF(INDEXC,1)=REF(C,1)ANDREF(O,1)/REF(C,1)>=1.05
ANDREF(C,1)OANDC/O>=1.05ANDC>REF(O,1)
ANDREF(VOL,1)
STICKLINE(BB,O,C,4,0),COLORRED;
STICKLINE(BB,O,H,0,0),COLORRED;
STICKLINE(BB,L,C,0,0),COLORRED;
DRAWTEXT(BB,L*0.95,'追!'),COLORYELLOW;
VAR1:=4*SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,5,1),3.2,1);
VAR2:=8;
CC:=CROSS(VAR1,VAR2);
DRAWTEXT(CC,L*0.95,'买!'),COLORMAGENTA;
TYP:=(H+L+C)/3;
TYP1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14))<=20ANDREF(MA(C,21),1)
TJ1:=O
TJ2:=REF(C,1)>=MA(C,21)ANDL/MA(C,21)>=1.015ANDMA(C,144)>MA(C,250)ANDVV;
TJ3:=REF(MA(C,250),90)MA(C,250)ANDO>MA(C,250);
TJ4:=MAX(REF(H,10)ANDREF(H,9)ANDREF(H,8)ANDREF(H,7),REF(H,6));
TOUJI:=TYP1ANDTJ1ANDTJ2ANDREF(C,2)/REF(O,2)<1.06ANDC/O<=1.05ANDHHV(H,5)/LLV(L,30)>=1.65AND
REF(H,5)/REF(L,1)>=1.15ANDREF(C,1)/REF(O,1)<=0.995AND(L=2)ANDO/REF(L,1)<=1.04
ORTYP1ANDTJ1ANDO/REF(L,1)<1.05ANDREF(L,1)/REF(O,4)<=0.85ANDREF(C,1)/REF(O,1)<=1.03ANDO1.35AND
V
TOUJI2:=TYP1ANDTJ1ANDTJ2ANDO/REF(L,1)<1.05ANDO/LLV(L,3)<1.1ANDREF(C,1)/REF(0,1)<=1.05AND
HHV(H,4)/LLV(L,16)>=1.35ANDREF(O,4)/REF(C,2)>=1.08ANDREF(C,2)/REF(O,2)<=0.995AND(REF(L,2)=2)ANDL
ORTYP1ANDTJ1ANDHHV(H,10)/LLV(L,25)>=1.3ANDREF(C,5)
DATOUJI:=TYP1ANDTJ3ANDO=1.17ANDHHV(H,10)/LLV(L,30)>1.4AND(MA(V,10)/HHV(V,10)>0.5AND
V/HHV(V,10)>0.2ANDV/HHV(V,10)<0.4ORREF(V,3)>REF(V,2)ANDREF(V,2)>REF(V,1))ANDREF(C,1)/REF(C,2)<=1.02;
DATOUJI1:=TYP1ANDTJ3ANDO
DRAWTEXT(TOUJIORTOUJI2ORDATOUJIORDATOUJI1,L*0.98,'△'),COLORYELLOW;
DRAWTEXT(CROSS(MA(VOL,10),MA(VOL,20))ANDMA(VOL,5)>MA(VOL,10)ANDL=MA(C,20),L*0.98,'量
托'),COLORWHITE;
卖出:=CROSS(90,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100);
DRAWTEXT(卖出,H*1.05,'短卖'),COLORGREEN;
C3:=REF(C,1);
涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORRED;
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
突破盘整:=W4ANDCOUNT(W4,5)=1;
DRAWICON(突破盘整,L-0.10,1);
红轨道:=MA(MA(CLOSE,3),1),LINETHICK1,COLORYELLOW;
绿轨道:=MA(MA(CLOSE,3),3);
上升:IF(红轨道>=绿轨道,绿轨道,DRAWNULL),COLORRED,LINETHICK2;
AA1:=3*SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1)-2*SMA(SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1),3,1);
加仓:=IF(CROSS(AA1,REF(AA1+0.01,1))ANDLLV(AA1,2)=LLV(AA1,8)ANDBETWEEN(AA1,20,60),1,0);
波段底:=(3)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1))-
(2)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1));
DRAWICON(加仓,L*0.97,7);
DRAWICON(CROSS(波段底,3),L*0.97,1);
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
卖:=IF(HHV(DX,2)=HHV(DX,7)ANDCOUNT(DX>50,2)ANDCROSS(MA(DX,2),DX),1,0);
DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'卖'),COLORWHITE;
买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)ANDCROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买=1,5),LOW-0.2,'买'),COLORRED;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
BDGD:=HHV(J,2)=HHV(J,8)ANDJ>80;
注意:=IF(CROSS(REF(J-0.01,1),J)ANDREF(BDGD,1),1,0);
DRAWTEXT(注意AND卖!=1,HIGH*1.02,'减'),COLORFFFF50;
加仓A:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;
DRAWTEXT(FILTER((CROSS(加仓A,0)ORCROSS(CLOSE,CB))AND买!=1,3),LOW-0.1,'加'),COLOR0080FF;
MA18:=MA(C,18);
跟:=IF(MA18>=REF(MA18,3)ANDCROSS(CLOSE,MA18),1,0);
DRAWTEXT(MA18>=REF(MA18,3)ANDCROSS(CLOSE,MA18),LOW*0.96,'跟'),COLOR7F52AF;
买价:=((C-REF(MA5,1))/5+MA5)*1.004;
买条件:=CROSS(C,买价)AND买价>REF(买价,1);
醉⽩K买进:IF(买条件,L,H),COLORWHITE,POINTDOT;
STICKLINE(买条件,H,L,0,1),COLORWHITE,LINETHICK2;
STICKLINE(买条件,O,C,4,1),COLORWHITE,LINETHICK2;
加码价:=((C-REF(MA10,1))/20+MA10)*1.004;
加码条件:=CROSS(C,加码价)AND加码价>REF(加码价,1);
醉黄K加码:IF(加码条件,L,H),COLORYELLOW,POINTDOT;
STICKLINE(加码条件,H,L,0,1),COLORYELLOW,LINETHICK2;
STICKLINE(加码条件,O,C,4,1),COLORYELLOW,LINETHICK2;
DRAWTEXT_FIX(1,0.0,0.15,0,'在上升过程中,⽩线出现在红线下⽅明显分开则卖出!'),COLORMAGENTA;
评论(0)