MA5:MA(C,5);
IF(MA5 =C,MA5,DRAWNULL),COLORGREEN;
IF(MA5 C,MA5,DRAWNULL),COLORLIMAGENTA,LINETHICK2;
现价:REFDATE(C,DATE),DOTLINE,COLORLIGRAY;
高D:=REF(HHV(H,72),5);
龙门:REFDATE(高D,DATE),COLORWHITE,LINETHICK2;
MCST:=DMA(AMOUNT/(100*V),V/CAPITAL),COLORFFFF00;
月线:=WMA(C,250),COLORGREEN;
小月线:=WMA(C,251),COLORGREEN;
线角:ATAN((月线/REF(月线,1)-1)*100)*180/3.1416,NODRAW,COLOR5588FF;
DRAWBAND(月线,RGB(250,10,10),小月线,RGB(10,220,10));
DRAWKLINE(H,O,L,C);
冲线日:REF(O,BARSLAST(CROSS(C,月线))),COLORFF00FF,NODRAW;
破线日:REF(O,BARSLAST(CROSS(月线,C))),COLORFFFF00,NODRAW;
STICKLINE(C 冲线日,冲线日,冲线日,5,0),COLORFF00FF;
STICKLINE(CROSS(C,月线) AND 线角 -13,O,C,2.8,0),COLORFF00FF;
DRAWTEXT(CROSS(C,月线) AND 线角 -13,L*0.99,'B'),COLORYELLOW;
STICKLINE(C 破线日,破线日,破线日,5,0),COLORFFFF00;
STICKLINE(CROSS(月线,C) AND 线角 10,O,C,2.8,0),COLORLIGREEN;
DRAWTEXT(CROSS(月线,C) AND 线角 10,H*1.03,'S'),COLORWHITE;
峰顶:=CROSS(月线,C);
峰距:=BARSLAST(峰顶);
谷底:=CROSS(C,月线);
谷距:=BARSLAST(谷底);
TM:=1200823;
涨停:IF(DATE TM,ZTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),ZTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORRED;
跌停:IF(DATE TM,DTPRICE(REF(C,1),IF(CODELIKE('688'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1))),DTPRICE(REF(C,1),IF(CODELIKE('688') OR CODELIKE('300'),0.2,IF(NAMEINCLUDE('S'),0.05,0.1)))),NODRAW,COLORGREEN;
明涨停:IF(DATE TM,C*IF(CODELIKE('688'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)),C*(IF(CODELIKE('688') OR CODELIKE('300'),1.2,IF(NAMEINCLUDE('S'),1.05,1.1)))),NODRAW,COLORLIMAGENTA;
明跌停:IF(DATE TM,C*IF(CODELIKE('688'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)),C*(IF(CODELIKE('688') OR CODELIKE('300'),0.8,IF(NAMEINCLUDE('S'),0.45,0.9)))),NODRAW,COLORFFFF00;
ZT:=C =涨停 AND PERIOD=5 AND H=C;
ZT1:=H =涨停 AND PERIOD=5 AND H
DT:=C =跌停 AND PERIOD=5 AND L=C;
DT1:=L =跌停 AND PERIOD=5 AND L
连阴:=COUNT((C REF(C,1) OR L REF(L,1)),10)
间谍柱:=REF(连阴,1) AND (DT OR DT1);
卧龙根价:DRAWLINE(间谍柱,(C+O)/2,REF(间谍柱,1),REF((C+O)/2,1),1),COLOR55FFCC;
{涨停K线颜色设置}
STICKLINE(ZT,C,(O+C)/2,3,0),COLOR000099;
STICKLINE(ZT,C,(O+C)/2,2.2,0),COLOR0000CC;
STICKLINE(ZT,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT,C,(O+C)/2,0.5,0),COLORCC66FF;
STICKLINE(ZT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(ZT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(DT,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT,O,(O+C)/2,0.5,0),COLORFFFFFF;
STICKLINE(DT,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT,C,(O+C)/2,0.5,0),COLOR00FF00;
{曾涨跌停打开K线颜色设置}
STICKLINE(ZT1,C,(O+C)/2,3,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,2.2,0),COLORFF00FF;
STICKLINE(ZT1,C,(O+C)/2,1.5,0),COLOR0000FF;
STICKLINE(ZT1,O,(O+C)/2,3,0),COLOR999999;
STICKLINE(ZT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(ZT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,O,(O+C)/2,3,0),COLOR888888;
STICKLINE(DT1,O,(O+C)/2,2.2,0),COLORBBBBBB;
STICKLINE(DT1,O,(O+C)/2,1.5,0),COLORDDDDDD;
STICKLINE(DT1,C,(O+C)/2,3,0),COLOR009900;
STICKLINE(DT1,C,(O+C)/2,2.2,0),COLOR00BB00;
STICKLINE(DT1,C,(O+C)/2,1.5,0),COLOR00DD00;
STICKLINE(DT1,C,(O+C)/2,0.5,0),COLOR00FF00;
DRAWTEXT(ZT AND DT1 AND PERIOD=5,L-0.03,'地天板'),COLORCC00CC;{从跌停到涨停}
DRAWTEXT(DT AND ZT1 AND PERIOD=5,H+0.03,'天地板'),COLOR00CC00;{从涨停到跌停};
DRAWTEXT(DT1,L-0.09,'撬'),COLORCC00CC;{从涨停到跌停};
DRAWTEXT(ZT1,H+0.03,'炸'),COLOR00CC00;{从涨停到跌停};
LB:=REF(EVERY(ZT,3),2) AND REF(H=HHV(H,20),1) AND H REF(H,1);
LBQ:=BARSLAST(LB);
妖股打折:REF(H,LBQ+1)*0.65,NODRAW,COLORWHITE;
STICKLINE(妖股打折,妖股打折,妖股打折,5,0),COLORWHITE;
Q3:=STRCAT(CON2STR(妖股打折,2),'打折线');
DRAWTEXT(ISLASTBAR,妖股打折,VARCAT(VARCAT('打折价',VAR2STR(妖股打折,2)),'元'))COLORFFFF00;
下跌振价:=L-REF(H,峰距),NODRAW,COLORCC9966;
下跌振幅:=ABS(L-REF(H,峰距))/L,NODRAW,COLORCC9966;
区间下跌:=C-REF(C,峰距+1),NODRAW,COLORLIGREEN;
空仓损失%:100*(C-REF(C,峰距+1))/REF(C,峰距+1),NODRAW,COLORLIGREEN;
Q1:=STRCAT(CON2STR(空仓损失%,2),'%');
DRAWTEXT(CURRBARSCOUNT=1,L*0.99,Q1),COLORLIGREEN;
上涨振价:=H-REF(L,谷距),NODRAW,COLORCC00FF;
上涨振幅:=(H-REF(L,谷距))/REF(L,谷距)*100,NODRAW,COLORCC00FF;
区间上涨:=C-REF(C,谷距+1),NODRAW,COLORRED;
持仓利润%:100*(C-REF(C,谷距+1))/REF(C,谷距+1),NODRAW,COLORRED;
Q2:=STRCAT(CON2STR(持仓利润%,2),'%');
DRAWTEXT(CURRBARSCOUNT=1,H*1.011,Q2),COLORLIRED;
假阴:=REF(C =O,1) AND AMOUNT/V/100 REF(C,1) AND C
假阳:=REF(C =O,1) AND H REF(O,1) AND C (REF(O-C,1))/3+REF(C,1) AND AMOUNT/V/100 REF(C,1) AND C
STICKLINE(假阴,O,C,0.2,0),COLORRED;{假阴柱};
STICKLINE(假阳,O,C,0.7,0),COLORLIGREEN;{假阳柱};
DY:=C REF(C,1)*1.035;{www.9m8.cn 九毛八公式指标网}
止盈价:IF(持仓利润% 50 AND DY AND H REFX(H,1) ,H,DRAWNULL),COLORYELLOW,NODRAW;
STICKLINE(止盈价 0,C,O,3,1),COLORLIGREEN;
DRAWICON(止盈价 0,H*1.05,2);
DRAWICON(REF(ZT OR ZT1,1) AND 假阴 AND H=HHV(H,5) AND V =REF(V,1)*0.9 AND C REFX(C,1),H*1.03,8);
DRAWICON(ZT1 AND H=HHV(H,10) AND V =REF(V,1) AND H REFX(H,1),H*1.03,8);
首板:=ZT AND COUNT(ZT,2)=1;
二板:=REF(首板,1) AND ZT;
三板:=REF(二板,1) AND ZT;
四板:=REF(三板,1) AND ZT;
五板:=REF(四板,1) AND ZT;
六板:=REF(五板,1) AND ZT;
七板:=REF(六板,1) AND ZT;
八板:=REF(七板,1) AND ZT;
九板:=REF(八板,1) AND ZT;
十板:=REF(九板,1) AND ZT;
DRAWTEXT(首板,0.1+(C+O)/2,'1'),COLORWHITE;
DRAWTEXT(二板,0.1+(C+O)/2,'2'),COLORYELLOW;
DRAWTEXT(三板,0.1+(C+O)/2,'3'),COLOR00CC99;
DRAWTEXT(四板,0.1+(C+O)/2,'4'),COLORGREEN;
DRAWTEXT(五板,0.1+(C+O)/2,'5'),COLORLIGRAY;
DRAWTEXT(六板,0.1+(C+O)/2,'6'),COLORLIRED;
DRAWTEXT(七板,0.1+(C+O)/2,'7'),COLORLIBLUE;
DRAWTEXT(八板,0.1+(C+O)/2,'8'),COLORBLUE;
DRAWTEXT(九板,0.1+(C+O)/2,'9'),COLORWHITE;
DRAWTEXT(十板,0.1+(C+O)/2,'10'),COLORYELLOW;
{风险系数}
XXX1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
XXX2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替}
XXX3:=FINANCE(23)/FINANCE(10)*3.3;
XXX4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
XXX5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=XXX1+XXX2+XXX3+XXX4+XXX5;
DRAWTEXT_FIX(Z值 1.2,0.52,0.20,1,' ●重 警●'),COLORFFFF00;
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.52,0.20,1,' ◇轻 警◇'),COLORFFFF00;
DRAWTEXT_FIX(Z值 2.6,0.52,0.20,1,' ◎无 警◎'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=1,L*0.995,EXTERNSTR(0,4)); { 涨停原因}
收阴:=(C REF(C,1) OR L REF(L,1) OR AMOUNT/V/100 REF((C+O)/2,1)) AND O =REF(C,1);
多阴:=EVERY(收阴,2);
小阳:=O-L =0.03 AND H C AND C O AND O REF(C,1) AND C REF(MAX(C,O),1) AND V REF(V,1);
宝莲灯:=REF(多阴,1) AND 小阳;
STICKLINE(宝莲灯,O,C,2.5,0),COLORCC22FF;
STICKLINE(宝莲灯,(O+C)/2-0.02,(O+C)/2+0.02,2,0),COLORWHITE;
DRAWICON((ZIG(3,5) REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1) =REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2) =REF(ZIG(3,5),3)),LOW*0.98,7);
DRAWICON((ZIG(3,5) REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1) =REF(ZIG(3,5),2))
AND (REF(ZIG(3,5),2) =REF(ZIG(3,5),3)),HIGH*1.02,8);
DRAWTEXT_FIX(1,0.980,20,1,'★九毛八公式指标网www.9m8.cn'),COLOR666666;
MA10:=MA(C,10),COLORYELLOW;
MA20:=MA(C,20),COLORFF00FF;
MA30:=MA(C,30);
MA55:=MA(C,55);
低ZK:=REF(C,1) MA5 AND REF(C,1) MA10 AND REF(C,1) MA20 AND REF(L,1) MA30 AND REF(L,1) MA55;
低K:=O MA5 AND O MA10 AND O MA20 AND L MA30 AND L MA55;
高K:=C MA5 AND C MA10 AND H MA20 AND H MA30 AND H MA55;
HSLZ:=V*10000/FINANCE(46);
穿多线:=C REF(C,1)*1.02 AND H C+0.06 AND (低K OR 低ZK) AND 高K AND V REF(V,1) AND HSLZ =1.5;
DRAWTEXT(穿多线,L*0.99,'↖一穿五'),COLORYELLOW;