通达信猎豹趋势主图和副图公式
主图源码
VAR1:=EMA(EMA(CLOSE,9),9);
主力:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
开始进场:=CROSS(主力,0);
无庄:=主力<0;
有庄:=主力>REF(主力,1) AND 主力>0;
VAR2:=100*WINNER(CLOSE*0.95);
强庄:VAR2>50 AND COST(85)<CLOSE AND 主力>0,COLORYELLOW,NODRAW;
DRAWTEXT(强庄,MA(C,13),'●'),COLORYELLOW,LINETHICK4;
出货:=主力<REF(主力,1) AND 主力>0;
操盘线5:=MA(CLOSE,5),COLORWHITE;
工作线12:EXPMA(CLOSE,12),COLORLIRED,LINETHICK2;
工作线下跌:IF(EXPMA(CLOSE,12)<REF(EXPMA(CLOSE,12),1),EXPMA(CLOSE,12),DRAWNULL),COLORGREEN,LINETHICK2;
生命线50:EXPMA(CLOSE,60),COLORMAGENTA,LINETHICK2;{原50}
生命线下跌:IF(EXPMA(CLOSE,50)<REF(EXPMA(CLOSE,50),1),EXPMA(CLOSE,50),DRAWNULL),COLORLIBLUE,LINETHICK2;
强势:=主力>REF(主力,1) AND 主力>0;
进入短线强势区:=CROSS("KDJ.J",80) AND "MACD.DIF">"MACD.DEA"
AND MA(C,5)>MA(C,30) AND "MACD.MACD">REF("MACD.MACD",1);
TJ强于大盘:=C/REF(C,1)>INDEXC/REF(INDEXC,1);
DRAWICON("KDJ.J"-REF("KDJ.J",1)>30 AND C/REF(C,1)>1.043 AND "MACD.MACD">0 AND
工作线12>生命线50,L*0.90,5);
HD:=FILTER(BACKSET(FILTER(REF(C,10)=HHV(C,2*10+1),10),10+1),10);
LD:=FILTER(BACKSET(FILTER(REF(C,10)=LLV(C,2*10+1),10),10+1),10);
波峰:IF(BARSLAST(HD)<BARSLAST(LD) AND NOT(HD),REF(C,BARSLAST(HD)),REF(C,BARSLAST(HD))),COLORFF00FF,POINTDOT;
波谷:IF(BARSLAST(HD)>BARSLAST(LD) AND NOT(LD),REF(C,BARSLAST(LD)),REF(C,BARSLAST(LD))),COLOR80FF00,POINTDOT;
突破:CROSS(C,波峰) AND VOL>MA(VOL,25) AND C/REF(C,1)>1.0143,LINETHICK0;
DRAWTEXT(突破,L*0.95,'突破'),COLORMAGENTA;
起爆:"KDJ.J"-REF("KDJ.J",1)>30 AND C/REF(C,1)>1.043
AND "MACD.MACD">0 AND 工作线12>生命线50,NODRAW;
STICKLINE(有庄 AND C>=O AND "MACD.DEA">0,C,O,2,1),COLORRED;
STICKLINE(有庄 AND C<O AND "MACD.DEA">0,C,O,1,0),COLORRED;
STICKLINE(强庄 AND C>=O AND "MACD.DEA">0 AND "MACD.MACD">0,C,O,2,1),COLORMAGENTA;
STICKLINE(强庄 AND C<O AND "MACD.DEA">0 AND "MACD.MACD">0,C,O,1,0),COLORMAGENTA;
STICKLINE(出货 AND C>=O OR 主力<0 AND "MACD.DEA">0 AND C>=O ,C,O,2,1),COLORGREEN;
STICKLINE(出货 AND C<O OR 主力<0 AND "MACD.DEA">0 AND C<O ,C,O,1,0),COLORGREEN;
STICKLINE(主力<0 AND "MACD.DEA"<0 AND C<O OR "MACD.DEA"<0 AND C<O,C,O,2,0),COLORLIBLUE;
STICKLINE(主力<0 AND "MACD.DEA"<0 AND C>=O OR "MACD.DEA"<0 AND C>=O,C,O,1,1),COLORLIBLUE;
DRAWICON(突破 OR 起爆,L*0.97,1);
{操盘要点---副图}
V8:=600*(EMA(C,3)-EMA(L,30))/EMA(L,30);
V9:=EMA(V8,7);
VA:=(WINNER(120*C/100)-WINNER(100*C/100))*100;
VB:=(-100)*(WINNER(120*C/100)-WINNER(100*C/100))+5;
底买入: IF(VA+VB< 7 AND CROSS(V8,V9) AND V9< -18 AND V9< VB,60,50),COLORLIGREEN,DOTLINE;
VC:=(2*C+H+L)/4;
VD:=LLV(L,34);
VE:=HHV(H,34);
VF:=LLV(L,21);
V10:=HHV(H,21);
V11:=EMA((VC-VF)/(V10-VD)*100,5);
V12:=EMA((VC-VD)/(VE-VD)*100,8);
股价重心:V11,COLORWHITE;
顶区:V12;
STICKLINE(V11-V12+20>=20 ,V11-V12+20 ,20 ,1 ,0 ),COLORF000FF;
V13:=EMA(V12,5);
STICKLINE(V12>0 AND (V12-V13)>=0 ,80 ,78 ,1 ,0 ),COLORRED;
STICKLINE(V12>0 AND (V12-V13)<0 ,80 ,78 ,1 ,1 ),COLORBLUE;
STICKLINE(V12>0 AND (V12-V13)>=0 ,20 ,18 ,1 ,0 ),COLORRED;
STICKLINE(V12>0 AND (V12-V13)<0 ,20 ,18 ,1 ,1 ),COLORBLUE;
STICKLINE(V12>V13 , V12,V13,1 ,1 ),COLORGREEN;
743599407.jpg
|