主图
N 1 100 20
M 1 20 5
NBAR:=BARSLAST(DATE<>REF(DATE,1))+1;
HHN:REF(HHV(H,N),1);
突破上轨:CROSS(C,HHN),COLORYELLOW,NODRAW;
STICKLINE(CROSS(C,HHN),HHN,HHN*1.01,2,0),COLORYELLOW;
STICKLINE(CROSS(C,HHN),O,C,3,0),COLORYELLOW;
LLN:REF(LLV(L,N),1);
MID:(HHN+LLN)/2;
中轨突破:CROSS(C,MID),COLORRED,NODRAW;
STICKLINE(CROSS(C,MID),O,C,3,0),COLORRED;
T1:=TIME>900 AND TIME <1455;
T2:=TIME>=1455;
开多条件:=H>HHN AND (HHN-MID)/MID<M/1000 AND NBAR>=30 AND T1;
开空条件:=L<LLN AND (MID-LLN)/MID<M/1000 AND NBAR>=30 AND T1;
BUY(开多条件,LOW),COLORFF00FF;
SELLSHORT(开空条件,HIGH),COLORBLUE;
SELL(T2,HIGH);
BUYSHORT(T2,LOW);
AUTOFILTER;
DRAWTEXT_FIX(1,0.05,0.03,0,HYBLOCK),COLOR0000FF;
DRAWTEXT_FIX(1,0.01,0.03,0,DYBLOCK),COLOR0000FF;
DRAWTEXT_FIX(1,0.09,0.03,0,'概念:'),COLORWHITE;
DRAWTEXT_FIX(1,0.11,0.03,0,GNBLOCK),COLORRED;
DRAWTEXT_FIX(1,0.01,0.1,0,'风格:'),COLORWHITE;
DRAWTEXT_FIX(1,0.03,0.1,0,FGBLOCK),COLORRED;
副图1
VAR1:=EMA(EMA(CLOSE,20),9);
控盘:60+(VAR1-REF(VAR1,1))/REF(VAR1,1)*10000,NODRAW,COLOR00FFFF;
STICKLINE(控盘>50,控盘,50,2.5,0),COLOR00FFFF;
STICKLINE(控盘>60 AND 控盘>MA(控盘,3),控盘,60,2.5,0),COLOR0000FF;
STICKLINE(控盘>100 AND 控盘>MA(控盘,3),控盘,100,2.5,0),COLORFF00FF;
低控盘:控盘>50 AND 控盘<60 AND 控盘>MA(控盘,3),COLOR00FFFF,NODRAW;
中控盘:控盘>60 AND 控盘<100 AND 控盘>MA(控盘,3),COLOR0000FF,NODRAW;
高控盘:控盘>100 AND 控盘>MA(控盘,3),COLORFF00FF,NODRAW;
副图2
X_1:=EMA(EMA(CLOSE,9),9);
X_2:=(X_1-REF(X_1,1))/REF(X_1,1)*1000;
STICKLINE(X_2<0,X_2,0,1,0),COLORWHITE;
X_3:=CROSS(X_2,0);
无庄控盘:IF(X_2<0,X_2,0),COLORWHITE;
开始控盘:IF(X_3,5,0),COLORYELLOW,LINETHICK2;
STICKLINE(X_2>REF(X_2,1) AND X_2>0,X_2,0,1,0),COLORRED;
有庄控盘:IF(X_2>REF(X_2,1) AND X_2>0,X_2,0),COLORRED;
X_4:=100*WINNER(CLOSE*0.95);
STICKLINE(X_4>50 AND COST(85)<CLOSE AND X_2>0,X_2,0,1,0),COLORMAGENTA;
高度控盘:IF(X_4>50 AND COST(85)<CLOSE AND X_2>0,X_2,0),COLORMAGENTA;
STICKLINE(X_2<REF(X_2,1) AND X_2>0,X_2,0,1,0),COLORGREEN;
控盘趋弱:IF(X_2<REF(X_2,1) AND X_2>0,X_2,0),COLORGREEN;
副图3
DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),STICK;
STICKLINE(DIFF< 0,0,DIFF,2,0),COLORGREEN;
STICKLINE(DIFF>=0,0,DIFF,2,0),COLORRED;
STICKLINE(DEA>=0,0,DEA,2,-1),COLOR0000CC;
STICKLINE(DEA< 0,0,DEA,2,-1),COLORGREEN;
柱1:=IF(DIFF>DEA,DIFF,0),COLORRED;
柱2:=IF(DEA< DIFF,DEA,0),COLORMAGENTA;
DRAWICON(CROSS(DIFF,DEA),柱2,1);
DRAWICON(CROSS(DEA,DIFF),DEA*1.1,2);
总涨跌比:DYNAINFO(60)/(DYNAINFO(60)+DYNAINFO(61))*100,COLORCYAN,NODRAW;
净资产:=FINANCE(34);
年ROE:FINANCE(33)/FINANCE(34)COLORCYAN,NODRAW;
PE:=DYNAINFO(39),COLORRED,NODRAW;
PB:CONST(DYNAINFO(7) / FINANCE(34))COLOREE3AB2,NODRAW;
回报率:年ROE/PB*100,COLOR0099FF,NODRAW;
M:=9;
SHORT:=12;
LONG:=26;
JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));
DIF拐头价:=(DIFF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORCYAN,LINETHICK3;
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORGREEN;
DRAWTEXT_FIX(1,0.9,0.94,0,STRCAT('拐点价格: ',CON2STR(DIF拐头价,2))),COLORYELLOW;
DRAWNUMBER(DIFF>DEA,3,BARSLAST(CROSS(DIFF,DEA))+1),COLORRED,NODRAW;
DRAWNUMBER(DIFF< DEA,-1,BARSLAST(CROSS(DEA,DIFF))+1),COLORGREEN,NODRAW;
DRAWTEXT_FIX(1,0.0,0.95,0,STRCAT('停止操作: ',CON2STR(CLOSE< MA(CLOSE,60),2))),COLORCYAN;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV1:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
OBV2:=EMA(OBV1,3)-MA(OBV1,9);
OBV3:=EMA(IF(OBV2>0,OBV2,0),3);
MAC3:=MA(C,3);
STICKLINE(OBV3>REF(OBV3,1) AND MAC3>REF(MAC3,1),0,DEA/4,2,0),COLORYELLOW;
副图4
多头线:=EMA(C,1.5);
空头线:=EMA(C,5);
均衡线:=EMA(空头线,5),COLORGREEN;
VARF1:=COUNT(CROSS(多头线,均衡线),2)=1;
VARF2:=COUNT(CROSS(空头线,均衡线),2)=1;
擒牛抓妖:FILTER(VARF1 AND VARF2,2);