1.MACD、RSI、KDJ指标顶底背离提示,背离的条件越大力度越大。
2.添加了改版的MACD量柱,红色做多绿色做空,灰色力度减弱。
3.有零上零下二次金叉提示
指标源码:
引用1:(EMA(CLOSE,12) – EMA(CLOSE,26))*100/EMA(CLOSE,26);
引用2:EMA(引用1,9);
背离1:=2*(引用1-引用2),STICK;
背离2:=EMA(背离1,3);
STICKLINE(背离1>背离2 AND 背离1>0,0,背离1,0,0),COLORRED;
STICKLINE(背离1>背离2 AND 背离1<0,0,背离1,0,0),COLORGREEN;
STICKLINE(背离1<背离2,0,背离1,0,0),COLORCBCBC0;
STICKLINE(背离1>=0 OR 背离1<=0,0,0,50,1),COLORWHITE;
MACD:背离1,NODRAW,COLORMAGENTA;
强:IF(引用1>=引用2,引用1,DRAWNULL),COLORRED;
弱:IF(引用2>=引用1,引用2,DRAWNULL),COLORFF9900;
DRAWICON(CROSS(引用1,引用2),引用1+0.1,1);
DRAWICON(CROSS(引用2,引用1),0.4,2);
A1:=BARSLAST(REF(CROSS(“MACD.DIF”,”MACD.DEA”),1));
B1:=REF(C,A1+1)>C AND REF(“MACD.DIF”,A1+1)<“MACD.DIF” AND CROSS(“MACD.DIF”,”MACD.DEA”);
DRAWTEXT(B1>0,-0.8,’MACD底背’),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(“KDJ.K”,”KDJ.D”),1));
B2:=REF(C,A2+1)>C AND REF(“KDJ.K”,A2+1)<“KDJ.K” AND CROSS(“KDJ.K”,”KDJ.D”);
DRAWTEXT(B2,-0.6,’KDJ底离’),COLORYELLOW;{KDJ底背离};
A3:=BARSLAST(REF(CROSS(“RSI.RSI1″,”RSI.RSI2”),1));
B3:=REF(C,A3+1)>C AND REF(“RSI.RSI1”,A3+1)<“RSI.RSI1” AND CROSS(“RSI.RSI1″,”RSI.RSI2”);
DRAWTEXT(B3>0,-0.3,’RSI底离’),COLORCYAN;{RSI底背离};
C1:=BARSLAST(REF(CROSS(“MACD.DEA”,”MACD.DIF”),1));
D1:=REF(C,C1+1)<C AND REF(“MACD.DIF”,C1+1)>”MACD.DIF” AND CROSS(“MACD.DEA”,”MACD.DIF”);
DRAWTEXT(D1>0,0.4,’MACD顶离’),COLORBLUE;{MACD顶背离}
C2:=BARSLAST(REF(CROSS(“KDJ.D”,”KDJ.K”),1));
D2:=REF(C,C2+1)<C AND REF(“KDJ.K”,C2+1)>”KDJ.K” AND CROSS(“KDJ.D”,”KDJ.K”);
DRAWTEXT(D2>0,0.6,’KDJ顶离’),COLORLIMAGENTA;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS(“RSI.RSI2″,”RSI.RSI1”),1));
D3:=REF(C,C3+1)<C AND REF(“RSI.RSI1″,C3+1)>”RSI.RSI1” AND CROSS(“RSI.RSI2″,”RSI.RSI1”);
DRAWTEXT(D3>0,0.8,’RSI顶离’),COLORGREEN;{RSI顶背离};
DD:=C=HHV(C,180);
EE:=引用2< REF(引用2,1) AND REF(引用2< REF(引用2,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*引用2,COLOR00FFFF;
顶背离:(DD AND EE AND 引用2< HHV(引用2,180))*引用2,STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:= 引用2> REF(引用2,1) AND REF(引用2> REF(引用2,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*引用2,COLORMAGENTA;
底背离:(FF AND GG AND 引用2> LLV(引用2,180))*引用2,STICK,LINETHICK3,COLORRED;
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD9:=(DIF-DEA)*2;
AK1:=DIF<0 AND DEA<0;
AK2:=AK1!=REF(AK1,1) AND AK1;
AK3:=COUNT(CROSS(DIF,DEA),BARSLAST(AK2))=1 AND CROSS(DIF,DEA) AND AK1;
AK4:=COUNT(CROSS(DIF,DEA),BARSLAST(AK2))=2 AND CROSS(DIF,DEA) AND AK1;
AK5:=REF(DIF,BARSLAST(AK3))<=REF(DIF,BARSLAST(AK4));
零下二金:AK4 AND AK5,LINETHICK2,COLOR38B0DE;
BC1:=DIF>0 AND DEA>0;
BC2:=BC1!=REF(BC1,1) AND B1;
BC3:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=1 AND CROSS(DIF,DEA) AND BC1;
BC4:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=2 AND CROSS(DIF,DEA) AND BC1;
BC5:=REF(DIF,BARSLAST(BC3))<=REF(DIF,BARSLAST(BC4));
零上二金:BC4 AND BC5,LINETHICK2;
【源码分享】庄家提示量能副图指标公式(通达信电脑+手机版)
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0;
主动卖盘:IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;
STICKLINE(C<O ,0,VOL,3.2,0),COLORFF1100;
STICKLINE(C<O ,0,VOL,2.7,0),COLORFF3300;
STICKLINE(C<O ,0,VOL,2.1,0),COLORFF5500;
STICKLINE(C<O ,0,VOL,1.5,0),COLORFF7700;
STICKLINE(C<O ,0,VOL,0.9,0),COLORFF9900;
STICKLINE(C<O ,0,VOL,0.3,0),COLORFFBB00;
STICKLINE(C=O AND C<REF(C,1),0,VOL,3.2,0),COLOR006000;
STICKLINE(C=O AND C<REF(C,1),0,VOL,2.7,0),COLOR007500;
STICKLINE(C=O AND C<REF(C,1),0,VOL,2.1,0),COLOR009100;
STICKLINE(C=O AND C<REF(C,1),0,VOL,1.5,0),COLOR00A600;
STICKLINE(C=O AND C<REF(C,1),0,VOL,0.9,0),COLOR00BB00;
STICKLINE(C=O AND C<REF(C,1),0,VOL,0.3,0),COLOR00CC00;
STICKLINE(C=O AND C>REF(C,1),0,VOL,3.2,0),COLOR555555;
STICKLINE(C=O AND C>REF(C,1),0,VOL,2.7,0),COLOR777777;
STICKLINE(C=O AND C>REF(C,1),0,VOL,2.1,0),COLOR999999;
STICKLINE(C=O AND C>REF(C,1),0,VOL,1.5,0),COLORBBBBBB;
STICKLINE(C=O AND C>REF(C,1),0,VOL,0.9,0),COLORDDDDDD;
STICKLINE(C=O AND C>REF(C,1),0,VOL,0.3,0),COLORFFFFFF;
STICKLINE(C>O,0,VOL,3.2,0),COLORFF11FF;
STICKLINE(C>O,0,VOL,2.7,0),COLORFF33FF;
STICKLINE(C>O,0,VOL,2.1,0),COLORFF55FF;
STICKLINE(C>O,0,VOL,1.5,0),COLORFF77FF;
STICKLINE(C>O,0,VOL,0.9,0),COLORFF99FF;
STICKLINE(C>O,0,VOL,0.3,0),COLORFFBBFF;
资金异动:VOL/MA(VOL,55)*100,COLORYELLOW;
STICKLINE(主动买盘>0,0,主动买盘,3.2,0),COLOR000055;
STICKLINE(主动买盘>0,0,主动买盘,2.7,0),COLOR000077;
STICKLINE(主动买盘>0,0,主动买盘,2.1,0),COLOR000099;
STICKLINE(主动买盘>0,0,主动买盘,1.5,0),COLOR0000BB;
STICKLINE(主动买盘>0,0,主动买盘,0.9,0),COLOR0000DD;
STICKLINE(主动买盘>0,0,主动买盘,0.3,0),COLOR0000FF;
STICKLINE(主动卖盘<0,0,主动卖盘,3.2,0),COLOR006000;
STICKLINE(主动卖盘<0,0,主动卖盘,2.7,0),COLOR007500;
STICKLINE(主动卖盘<0,0,主动卖盘,2.1,0),COLOR009100;
STICKLINE(主动卖盘<0,0,主动卖盘,1.5,0),COLOR00A600;
STICKLINE(主动卖盘<0,0,主动卖盘,0.9,0),COLOR00BB00;
STICKLINE(主动卖盘<0,0,主动卖盘,0.3,0),COLOR00CC00;
STICKLINE(资金异动>100 ,0,VOL,0.6,0),COLORYELLOW;
SQX:=(C-MA(CLOSE,13))*100;
DIFF:EMA(MA(SQX,7),1),COLOR00FFFF;
DEA:EMA(DIFF,7),COLOR00FF00;
{大型股票公式,股票编程,股票技术教程投稿平台-你就是股神,网址:694.cn 备注:如果正文内容没有显示完全的,说明在附件中,请点击‘立即下载’下载该附件!}