当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码精选:驭龙排序V2019,精准解盘,MACD底部结构预警

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、驭龙排序V2019,通达信排序指标

{公式名称: 驭龙排序V2019}

{副图}
 
VAR1:=(EMA(CLOSE,12)/EMA(CLOSE,26)-1)*1000;
VAR2:=(EMA(INDEXC,12)/EMA(INDEXC,26)-1)*1000;
VAR3:=EMA(VAR1,5);
VAR4:=EMA(VAR2,5);
VAR5:=VAR3-REF(VAR3,1);
VAR6:=VAR4-REF(VAR4,1);
VAR7:=IF(VAR5-VAR6>0,(VAR5-VAR6)*5,0);
VAR8:=VAR7-REF(VAR7,1);
VAR9:=1991230;
VAR10:=1991229;
VAR11:=IF(1>VAR10,IF(CLOSE<80,1,0),0);
VAR12:=IF(1>VAR10,1,VAR11);
VAR13:=IF(1<1991230,SMA((CLOSE-REF(CLOSE,1))*VOL,3,1)/10000,0);
VAR14:=EMA(VAR13,12)-EMA(VAR13,26);
VAR15:=EMA(VAR14,9);
VAR16:=(VAR14-VAR15)*2;
VAR17:=HHVBARS(VAR16,BARSLAST(VAR16<0)+1);
VAR18:=CROSS(BACKSET(CROSS(0,VAR16),REF(VAR17,1)+2),0.5);
VAR19:=DRAWLINE(VAR18,VAR16,REF(VAR18,1),REF(VAR16,1),1);
VAR20:=VAR16>VAR19 AND VAR16>=REF(VAR16,1);
VAR21:=CLOSE>=ZTPRICE(REF(CLOSE,1),0.1) AND LOW=HIGH;
VAR22:=CLOSE>=ZTPRICE(REF(CLOSE,1),0.1) AND LOW=HIGH;
VAR23:=BARSSINCE(CLOSE)<1 OR (BARSSINCE(CLOSE)<34 AND VAR21=1);
VAR24:=CLOSE>=ZTPRICE(REF(CLOSE,1),0.1) AND LOW<HIGH;
VAR25:=HIGH>=ZTPRICE(REF(CLOSE,1),0.1) AND CLOSE<HIGH;
VAR26:=1+3*VAR24+1*VAR21+0.2*VAR25;
VAR27:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
VAR28:=VAR27*VAR26;
VAR29:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR30:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR31:=IF(CLOSE>OPEN,VAR29*(HIGH-LOW),IF(CLOSE<OPEN,VAR29*(HIGH-OPEN+(CLOSE-LOW)),IF(CLOSE=OPEN AND CLOSE>REF(CLOSE,1),VOL*0.7,VOL*0.3)));
VAR32:=IF(CLOSE>OPEN,VAR29*(HIGH-CLOSE+(OPEN-LOW)),IF(CLOSE<OPEN,VAR29*(HIGH-LOW),IF(CLOSE=OPEN AND CLOSE<REF(CLOSE,1),VOL*0.7,VOL*0.3)));
VAR33:=IF(CLOSE>OPEN,VAR30*(HIGH-LOW),IF(CLOSE<OPEN,VAR30*(HIGH-OPEN+(CLOSE-LOW)),VOL/2));
VAR34:=SUM((VAR31-VAR32)/CAPITAL,1)*1000;
VAR35:=VOL/10000;
VAR36:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
VAR37:=MOD(FROMOPEN,VAR36);
VAR38:=IF(VAR37<0.5,VAR36,VAR37);
VAR39:=IF(CURRBARSCOUNT=1 AND PERIOD<=5 AND DYNAINFO(8)>1,VOL*VAR36/VAR38/10000,DRAWNULL);
VAR40:=IF(CURRBARSCOUNT=1 AND PERIOD<=5,VAR39,VAR35);
VAR41:=VAR40/REF(MA(VAR40,5),1);
VAR42:=IF(VAR41>30,1,IF(VAR41>3 AND VAR41<=30,33,IF(CLOSE>=ZTPRICE(REF(CLOSE,1),0.1) AND VAR41<=2,VAR41*20,VAR41)));
VAR43:=IF(CLOSE>=REF(CLOSE,1) AND VAR41>3,33,IF(CLOSE<REF(CLOSE,1) AND VAR41>3,0,IF(CLOSE>=REF(CLOSE,1) AND VAR41<=3,VAR41*10,VAR41)));
VAR44:=1;
VAR45:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/4*VAR44;
VAR46:=EMA(CLOSE,2)-EMA(CLOSE,89);
VAR47:=EMA(VAR46,30)*VAR44;
VAR48:=2*(VAR46-VAR47)*10*VAR44;
VAR49:=POW(VAR48,3)*0.1+POW(VAR48,2)*VAR44;
VAR50:=IF(VAR48>0.015,VAR49,0)/45*VAR44;
VAR51:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR52:=VAR16-REF(VAR16,1);
VAR53:=DYNAINFO(4)>0;
VAR54:=EXIST(ABS(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>0.052,20) AND EXIST(CLOSE/REF(CLOSE,1)>1.15,2)!=1;
VAR55:=FINANCE(40)<300*100000000 AND FINANCE(7)<=20*100000000;
VAR56:=VAR54 AND VAR53 AND VAR23!=1 AND AMOUNT/10000>1000;
VAR57:=COUNT(HIGH/REF(CLOSE,1)>=1.081,5)>=2 AND CLOSE>=OPEN;
VAR58:=VAR12;
VAR59:=INDEXADV/(INDEXADV+INDEXDEC)*100;
VAR60:=VAR59>85 OR REF(VAR59,1)>85;
VAR61:=INDEXC-MA(INDEXC,7);
VAR62:=(HHV(VAR61,60)-0)*60/100;
VAR63:=VAR61>VAR62;
VAR64:=VAR60=1 OR VAR63=1;
VAR65:=IF(0=1,VAR64,0);
VAR66:=CLOSE>=OPEN;
VAR67:=(CLOSE-VAR51)/VAR51*100*2;
VAR68:=CLOSE>=ZTPRICE(REF(CLOSE,1),0.1);
连板:BARSLASTCOUNT(VAR68);
竞价:IF(FROMOPEN<=5 AND VAR65!=1 AND VAR56 AND VAR55 AND VAR57 AND VAR66 AND VAR20=1,(VAR34+VAR8*3+VAR28+VAR43+VAR52*5+VAR67)*3,0)*1.38,NODRAW,COLORYELLOW;
飞龙:IF(FROMOPEN>5 AND VAR65!=1 AND VAR56 AND VAR55 AND VAR57 AND VAR66 AND VAR20=1,(VAR34+VAR8*3+VAR28+VAR42+VAR52*5+VAR67)*3,0)*1.38,NODRAW,COLORMAGENTA;
 


2、精准解盘

精准解盘是我自己用着还不错的通达信主图指标!
 

TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);
TYX4:=MA((C+L+O+H)/4,13);
TYX5:=EMA((C+L+O+H)/4,21);
{空心红}
STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;
STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;
{深绿}
STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;
STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;
STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;
STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;
{蓝}
STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;
STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;
STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;
STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;
{黄}
STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;
STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;
STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;
STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;
{粉红}
STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;
STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;
STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;
STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;
{亮灰}
STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;
STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;
STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;
STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;
{深红}
STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;
STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;
STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;
STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;
{涨跌停K线}
STICKLINE(HIGH=LOW AND CLOSE=OPEN AND (CLOSE/REF(CLOSE,1))>1.048,HIGH,LOW,3,0) ,COLORRED;
STICKLINE(HIGH=LOW AND CLOSE=OPEN AND (REF(CLOSE,1)/CLOSE)>1.048,HIGH,LOW,3,0) ,COLOR00FF00;
{突破}
STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF;
海面:MA(C,60),COLORFFFFFF,NODRAW;
乘风:MA(C,8),COLORYELLOW,LINETHICK1,NODRAW;
破浪:EMA(C,21),LINETHICK2,COLORMAGENTA;
IF(破浪>海面,海面,DRAWNULL),COLORFFFFFF;
IF(乘风>=破浪,乘风,DRAWNULL),COLORYELLOW,LINETHICK1;
IF(乘风>破浪 AND 乘风<=REF(乘风,1),乘风,DRAWNULL),COLORCYAN,LINETHICK1;
IF(破浪<=REF(破浪,1),破浪,DRAWNULL),COLORGREEN,LINETHICK2;
AA:=COUNT(CROSS(EMA(C,21),MA(C,8)),30)=1;
BB:=COUNT(CROSS(EMA(C,21),MA(C,60)),30)=1;
CC:=REF(BARSLAST(AA AND BB),1);
DD:=CC AND CROSS(MA(C,8),EMA(C,21));
DRAWTEXT(DD,(LOW * 0.99),'←乘风'),COLOR80FFFF;
{股民学院 www.58188.com 整理}



3、MACD底部结构预警

本 MACD公式,组合了各种背离的情况和结构形成的信号

 
平时比较留意,特别收集了许多各个版本的MACD公式,每个公式都有自己的特点,所以总是想把各种功能组合在一起,这样就直观一些,特别适合一些像我这样的新手一样使用,终于达到了自己想要的效果,向老师学习助人为乐的精神,所以发出来,有未来,但是通过使用不影响正常使用,不喜欢的不要喷,公式就是公式,不是交易依据。
 
{MACD背离}
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:2*(DIF-DEA), COLORSTICK,LINETHICK2;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;
DRAWICON(CROSS(DIF,DEA),DEA,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,0.2,0),COLORRED;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0.2,0),COLORRED;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0.2,0),COLORBLUE;
STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,0.2,0),COLORBLUE;
{底部结构预警}
死叉:=CROSS(DEA,DIF);
N1:=BARSLAST(死叉),NODRAW;{最近一次死叉的位置}
N2:=REF(BARSLAST(死叉),N1+1),NODRAW;{倒数第二次死叉与倒数第一次死叉的区间}
N3:=REF(BARSLAST(死叉),N2+N1+2),NODRAW;{倒数第三次死叉与倒数第二次死叉的区间}
CL1:=LLV(C,N1+1),NODRAW;{最近一次死叉后,最低收盘价}
DIFL1:=LLV(DIF,N1+1),NODRAW;
CL2:=REF(CL1,N1+1),NODRAW;{倒数第二次死叉与倒数第一次死叉之间的最低收盘价}
DIFL2:=REF(DIFL1,N1+1),NODRAW;
CL3:=REF(CL2,N1+1),NODRAW;{倒数第三次死叉与倒数第二次死叉之间的最低收盘价}
DIFL3:=REF(DIFL2,N1+1),NODRAW;
PDIFL2:=IF(DIFL2>0,INTPART(LOG(DIFL2))-1,INTPART(LOG(-DIFL2))-1);
MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));
PDIFL3:=IF(DIFL3>0,INTPART(LOG(DIFL3))-1,INTPART(LOG(-DIFL3))-1);
MDIFL3:=INTPART(DIFL3/POW(10,PDIFL3));
MDIFB2:=INTPART(DIF/POW(10,PDIFL2));
MDIFB3:=INTPART(DIF/POW(10,PDIFL3));
直接底背离:=(CL1<CL2 ) AND (MDIFB2>MDIFL2) AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB2<=REF(MDIFB2,1);
隔峰底背离:=(CL1<CL3 AND CL3<CL2 ) AND (MDIFB3>MDIFL3) AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB3<=REF(MDIFB3,1);
B:直接底背离 OR 隔峰底背离,NODRAW;
BG:((MDIFB2>REF(MDIFB2,1))*REF(直接底背离,1)) OR ((MDIFB3>REF(MDIFB3,1))*REF(隔峰底背离,1)),NODRAW;
底背离消失:=(REF(直接底背离,1) AND DIFL1<=DIFL2 ) OR (REF(隔峰底背离,1) AND DIFL1<=DIFL3);
DRAWTEXT(TFILTER(B,MACD>0,1),(DIF+MACD),'钝化'),COLORRED;
STICKLINE(B OR BG,DIF,DEA,1,0),COLORRED;
DRAWTEXT(TFILTER(底背离消失,B,1),(DIF+MACD),'消失'),COLORYELLOW;
DRAWTEXT(TFILTER(BG,MACD>0,1),DIF*1.1,'结构形成'),COLORGREEN;
{顶部结构预警}
金叉:=CROSS(DIF,DEA);
M1:=BARSLAST(金叉),NODRAW;{最近一次金叉的位置}
M2:=REF(BARSLAST(金叉),M1+1),NODRAW;{倒数第二次金叉与倒数第一次金叉的区间}
M3:=REF(BARSLAST(金叉),M2+M1+2),NODRAW;{倒数第三次金叉与倒数第二次金叉的区间}
CH1:=HHV(C,M1+1),NODRAW;{最近一次金叉后,最高收盘价}
DIFH1:=HHV(DIF,M1+1),NODRAW;
CH2:=REF(CH1,M1+1),NODRAW;{倒数第二次金叉与倒数第一次金叉之间的最高收盘价}
DIFH2:=REF(DIFH1,M1+1),NODRAW;
CH3:=REF(CH2,M1+1),NODRAW;{倒数第三次金叉与倒数第二次金叉之间的最高收盘价}
DIFH3:=REF(DIFH2,M1+1),NODRAW;
PDIFH2:=IF(DIFH2>0,INTPART(LOG(DIFH2))-1,INTPART(LOG(-DIFH2))-1);
MDIFH2:=INTPART(DIFH2/POW(10,PDIFH2));
PDIFH3:=IF(DIFH3>0,INTPART(LOG(DIFH3))-1,INTPART(LOG(-DIFH3))-1);
MDIFH3:=INTPART(DIFH3/POW(10,PDIFH3));
MDIFT2:=INTPART(DIF/POW(10,PDIFH2));
MDIFT3:=INTPART(DIF/POW(10,PDIFH3));
直接顶背离:=(CH1>CH2 ) AND (MDIFT2<MDIFH2) AND (MACD>0 AND REF(MACD,1)>0) AND MDIFT2>=REF(MDIFT2,1);
隔峰顶背离:=(CH1>CH3 AND CH3>CH2 ) AND (MDIFT3<MDIFH3) AND (MACD>0 AND REF(MACD,1)>0) AND MDIFT3>=REF(MDIFT3,1);
T:直接顶背离 OR 隔峰顶背离,NODRAW;
TG:((MDIFT2<REF(MDIFT2,1))*REF(直接顶背离,1)) OR ((MDIFT3<REF(MDIFT3,1))*REF(隔峰顶背离,1)),NODRAW;
顶背离消失:=(REF(直接顶背离,1) AND DIFH1>=DIFH2 ) OR (REF(隔峰顶背离,1) AND DIFH1>=DIFH3);
DRAWTEXT(TFILTER(T,MACD<0,1),(DIF+MACD),'钝化'),COLORGREEN;
DRAWTEXT(TFILTER(顶背离消失,T,1),(DIF+MACD),'消失'),COLORYELLOW;
STICKLINE(T OR TG,DIF,DEA,1,0),COLORGREEN;
DRAWTEXT(TFILTER(TG,MACD<0,1),DIF*1.02,'结构形成'),COLORMAGENTA;

上一篇:通达信源码精选:N字霸气黄金图,资金诊断,金拐点主图

下一篇:通达信源码精选:军师操盘,精准抄底二代,相似K线主图