RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*5;
FASTK:=SMA(RSV,3,1);
MD:=EMA(C,0)-EMA(C,5);
DRAWTEXT_FIX(ISLASTBAR,0.1,0.08,0,HYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.1,0,00,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.35,0.05,0,GNBLOCK)COLOR5B91FF;
DRAWTEXT_FIX(ISLASTBAR,0.35,0.13,0,FGBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.35,0.21,0,ZSBLOCK)COLOR5B91FF;
{凌波微步}
A1A:=EMA(CLOSE,9);
A1B:=((A1A-EMA(CLOSE,5))<0);
A1C:=((A1A-EMA(CLOSE,5))>0);
A1D:=BARSLAST(A1B);
A1E:=BARSLAST(A1C);
A1F:=IF((A1E>0),(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,0);
A20:=SUM(A1F,0);
A21:=IF((A1D>0),(0-2),0);
A22:=IF((A1E>0),SUM((CLOSE-REF(CLOSE,1))/REF(CLOSE, 1)*100,A1E),0);
A23:=A22/A1E;
A25:=EMA(EMA(EMA(CLOSE,3),3),3);
多方:((A25-REF(A25,1))+A25)COLOR0000FF,LINETHICK2;
空方:MA(多方,15),COLORGREEN,LINETHICK2;
安全线:MA(CLOSE,30),LINETHICK2,COLORBLUE;
金牛:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORYELLOW;
{上轨支撑}
拉升:=MA(C,2);
上轨:MA(REF(HHV(C,30),1),2),LINETHICK2,COLORFF8800;
下轨:MA(REF(LLV(C,30),1),2),LINETHICK4,COLORFF8800;
T4:=CROSS(拉升,下轨) AND 上轨/下轨>110/100;
T5:=CROSS(上轨,拉升) AND 上轨/下轨>110/100;
立:IF(下轨>=REF(下轨,1),下轨,DRAWNULL),COLORMAGENTA,LINETHICK4;
DRAWTEXT(C<=O AND C<上轨 AND REF(C>=O,1) AND REF(C>上轨,1) AND L>金牛,O,'逃!'),COLORGREEN;
短趋势线:MA(CLOSE,13),COLORWHITE,LINETHICK2;
IF(多方>REF(多方,1),多方,DRAWNULL),COLORFFFFCC,LINETHICK4,POINTDOT;
IF(空方>REF(空方,1),空方,DRAWNULL),COLOR00FFFF,LINETHICK4,POINTDOT;
STICKLINE((多方>空方),空方,多方,0,0)COLOR00FFFF;
STICKLINE((空方>多方),多方,空方,0,0)COLORFF0000;
AA:STICKLINE(CROSS(多方,空方),C,O,3.1,0),COLORBLUE;
STICKLINE(AA,C,O,3.1,0),COLORMAGENTA;
DRAWTEXT(CROSS(多方,空方),空方* 0.98,'买')COLOR0000FF;
DRAWICON(CROSS(多方,空方),H*1.04,25);
{三线顺 股票指标网}
MA1:=MA(CLOSE,5),LINETHICK2,COLORYELLOW;
MA2:=MA(CLOSE,10)COLOR00FFFF;
MA3:=MA(CLOSE,20)COLORFF00FF;
金:=IF(MA1>REF(MA1,1),MA1,DRAWNULL),COLORRED,LINETHICK2;
空:=IF(MA1<REF(MA1,1),MA1,DRAWNULL),COLORGREEN,LINETHICK2;
三线顺:=MA1>MA2 AND MA2>MA3 AND CROSS(MA1,MA3)AND CROSS(MA2,MA3);
ZG:=MA(C,21.8);
SG:=ZG+2*STD(C,21);
A3:=CROSS(C,SG);
STICKLINE(A3,O,C,2,0),COLORRED;
DRAWICON(A3 AND C>金牛,L,27);
DRAWICON(A3,H+0.1110,12);
{压力一};
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
LD1:=FILTER(C2,10);
牛熊分界线:MA(C,181),COLORBLUE,LINETHICK3;
前期高位:=REF(C,BARSLAST(HD)),COLOR0080FF,POINTDOT;
DRAWTEXT(ISLASTBAR AND 前期高位,前期高位,STRCAT('压力',CON2STR(前期高位,2))),COLOR0000FF;
STICKLINE(C,前期高位,前期高位,8,0),COLOR0000FF;
VAR1111:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR2222:=CROSS(VAR1111,0.9);
VAR3333:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR4444:=CROSS(VAR3333,0.9);
压力:=REF(HIGH,BARSLAST(VAR2222));
STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR2222)),REF(HIGH,BARSLAST(VAR2222)),2,1),COLORFFFFFF;
支撑:= REF(LOW,BARSLAST(VAR4444));
STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR4444)),REF(LOW,BARSLAST(VAR4444)),2,1),COLOR00B4FF;
涨停:=C/REF(C,1)>1.098;
STICKLINE(涨停,O,C,2,0),COLORRED;
VA:STICKLINE((C-REF(C,1))/REF(C,1)>0.05,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,3,0),COLORYELLOW;
VB:STICKLINE((C-REF(C,1))/REF(C,1)>0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,3,0),COLORMAGENTA;
STICKLINE((C-REF(C,1))/REF(C,1)>0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,2.8,0),COLOR570057;
STICKLINE((C-REF(C,1))/REF(C,1)>0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,2,0),COLOR7D007D;
STICKLINE((C-REF(C,1))/REF(C,1)>0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,1.5,0),COLOR990099;
STICKLINE((C-REF(C,1))/REF(C,1)>0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,1,0),COLORBD00BD;
STICKLINE((C-REF(C,1))/REF(C,1)>0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,0.5,0),COLORMAGENTA;
VC:STICKLINE((C-REF(C,1))/REF(C,1)<-0.05,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,2.5,0),COLORBLUE;
VD:STICKLINE((C-REF(C,1))/REF(C,1)<-0.095,MAX(O,C)-(ABS(O-C))/3,MAX(O,C)-ABS(O-C)*2/3,3,0),COLORGREEN;
HJZ:=(3*C+H+L+O)/6;
HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ,5)+2*REF(HJZ,6)+REF(HJZ,8))/36;
HJZ3:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;
{主力进场}
短买:=IF(TROUGHBARS(1,6,1)=0 AND HIGH>LOW+0,50,20);
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
主力进场:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
DRAWTEXT(FILTER(主力进场=1,5) AND H<金牛,LOW-0.05,'主力进场'),COLORYELLOW;
STICKLINE(主力进场,OPEN,CLOSE,2,0),COLORYELLOW;
DRAWICON((MA1>短趋势线 OR MA1=短趋势线) AND REF((MA1<短趋势线 OR MA1=短趋势线)AND (C>MA1 OR C!=MA1 OR H!=MA1) AND BARSCOUNT(C)+1>15,1),H*1.02,24);
中线:=MA(CLOSE,33),LINETHICK1;
中趋势线:=MA(CLOSE,55),LINETHICK1,COLORGRAY;
年线:=MA(CLOSE,250),LINETHICK1,COLORLIGRAY,POINTDOT;
上极限:=((C-REF(MA(CLOSE,20),1))/20+短趋势线)*1.20;
DRAWTEXT(CROSS(CLOSE,上极限) AND O<>ZTPRICE(REF(CLOSE,1),0.1)AND L>金牛,H*1.02,'减仓'),COLORGREEN;
DRAWTEXT(CROSS(CLOSE,MA(C,13))AND O<>ZTPRICE(REF(CLOSE,1),0.1)AND L>金牛 AND 短趋势线<REF(短趋势线 ,1) AND 短趋势线<中趋势线 ,H*1.02,'减仓'),COLORGREEN;
STICKLINE(CROSS(短趋势线,C) AND 短趋势线>REF(短趋势线 ,1) AND V<REF(V,1) AND 短趋势线>中趋势线 ,L,L*0.99,2,0),COLORYELLOW;
VAR1:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
DRAWTEXT(VAR1>9 AND V<REF(V,1) AND FILTER(VAR1<REF(VAR1,1),5)AND H>金牛,H*1.02,'洗盘'),COLORYELLOW;
支持:=DRAWTEXT(VAR1>9 AND V>REF(V,1) AND FILTER(VAR1<REF(VAR1,1),5),H*1.02,'减仓'),COLORGREEN;
DRAWTEXT(VAR1>20 AND FILTER(VAR1<REF(VAR1,1),5)AND L>金牛,H*1.06,'卖出'),COLORYELLOW;
VAR2:=HHV(VAR1>20,10);
DRAWTEXT(FILTER(VAR1<-9 AND VAR1>REF(VAR1,1),18) AND V>REF(V,1),L*0.98,'反弹'),COLORRED;
DRAWTEXT(VAR1<-20 AND FILTER(VAR1> REF(VAR1,1),5),L*0.95,'抄底'),COLORYELLOW;
DRAWTEXT(VAR2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20))AND O<>ZTPRICE(REF(CLOSE,1),0.1)AND L>金牛,H*1.1,'危险'),COLORYELLOW;
{黄钻}
X_6:=(HIGH+LOW+CLOSE)/3;
X_7:=(X_6-MA(X_6,14))/(0.015*AVEDEV(X_6,14));
DRAWICON(CROSS(X_7,(-95)),LOW,26);
DRAWICON(L>REF(H,1) AND NOT(REF(L>REF(H,1),1)) AND COUNT((L>REF(H,1)),BARSLAST(L>REF(H,1))+1)=1 AND EXIST((TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04),20) AND O<>ZTPRICE(REF(CLOSE,1),0.1),H*1.05,'跳空');
{财神主图}
财神空:=EMA(C,5);
均衡:=EMA(财神空,5),COLORWHITE;
中轨:=HHV(MA(H,13),13),COLORRED,LINETHICK2;
趋势:=LLV(MA(H,13),1),COLORBLUE,LINETHICK2;
VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);
VARC:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
VAR1D:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2D:=REF(VAR1D,1);
VAR3D:=SMA(MAX(VAR1D-VAR2D,0),10,1)/SMA(ABS(VAR1D-VAR2D),10,1)*100;
VAR4D:=FILTER(IF(COUNT(VAR3D<20,5)>=1 AND COUNT(VAR1D=LLV(VAR1D,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0),5);
VAR5D:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11);
A2D:=(100 * (CLOSE - (MA(CLOSE,30)))) / (MA(CLOSE,30));
A3D:=100-((90 * ((HHV(HIGH,20)) - CLOSE)) / ((HHV(HIGH,20)) - (LLV(LOW,20))));
A4D:=100-(MA(((100 * ((HHV(HIGH,6)) - CLOSE)) / ((HHV(HIGH,6)) - (LLV(LOW,6)))),28));
A5D:=MA(A4D,6);
红持股:=IF((A3D<A5D),A5D,A3D),COLORRED;
DRAWTEXT(红持股 AND VAR5D,H*1.03,'追'),COLOR00FF00;
VAR6D:=REF(CLOSE,1);
VAR7D:=SMA(MAX(CLOSE-VAR6D,0),6,1)/SMA(ABS(CLOSE-VAR6D),6,1)*100;
DRAWTEXT(CROSS(84,VAR7D),H*1.04,'逃顶'),COLORYELLOW ;
DRAWICON(CROSS(84,VAR7D),H*1.02,9);