您现在的位置:好股网 >> 股票公式 >> 同花顺公式 >> 一键转帖:同花顺短线抄底短顶副图指标 源码

同花顺短线抄底短顶副图指标 源码


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2019-08-31 09:06:00
公式简介:



//INCRATIO:0.01-1,0.96;
//PASTDAYS:1-30,10;
//DAYS:1-60,25;
Zeros:0;
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;
DIFF:=EMA(C,9)-EMA(C,17),colorblack;
DEA:=EMA(DIFF,8),COLOrffaa00;
MACD:=2*(DIFF-DEA);
MACD势增:=MACD>REF(MACD,1);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
MACD底背离:REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA),nodraw;
DRAWTEXT(MACD底背离,6,'底背'),colormagenta;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
MACD顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(MACD顶背离,VAR1*6.6,'顶背'),colorcyan;
MACD死叉:=CROSS(DEA,DIFF),nodraw;
MACD金叉:=CROSS(DIFF,DEA),nodraw;
DRAWICON(MACD死叉,VAR1*1.25,2) ;
// KDJ
N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1),coloryellow,LINETHICK1;
D:=SMA(K,M2,1),colorcyan,LINETHICK1;
J:=3*K-2*D,colormagenta,LINETHICK1;
KDJ势增:J>REF(J,1) AND J>0,nodraw;
高安全区:=0,colorred;
安全区:=20,colorcyan;
风险区:=100,colorgreen;
U1:=BARSLAST(REF(CROSS(K,D),1));
U2:=REF(C,U1+1)>C AND REF(K,U1+1)<K AND CROSS(K,D)AND d<50;
K底背离:IF(U2>0,1,0),nodraw;
DRAWTEXT(K底背离,6,'K背'),colorwhite;
rr:=MAX(C,O);
q1:=HHV(rr,5);
q2:=d<REF(d,1) AND REF(d,1)>REF(d,2);
A3:=BARSLAST(REF(q2,1));
K顶背离:=(REF(q1,A3+1)<q1 AND k<REF(k,A3+1) AND q2 ),nodraw;
KDJ金叉:=CROSS(J,K),nodraw;
KDJ死叉:=CROSS(K,J),nodraw;
持币区域:VAR1,colorgreen;
持股区域:IF(VAR1>0,VAR1,0),colorred;
最佳买点:持股区域>0 AND REF(持股区域,1)<=0,nodraw;
卖点:持股区域=0 AND REF(持股区域,1)>0,nodraw;
DRAWICON(最佳买点,0,1);
DRAWICON(卖点,0,2);
红买: IF(持股区域>0,0,DRAWNULL), colorred,LINETHICK2;
绿卖: IF(持股区域<=0,0,DRAWNULL),,COLORFFFF00,LINETHICK2;
/////////////////
短顶:=VAR1>9 AND FILTER(VAR1< REF(VAR1,1),5);
STICKLINE(短顶,0,VAR1+2,3,0),colorgreen;
DRAWTEXT(VAR1>9 AND FILTER(VAR1< REF(VAR1,1),5),VAR1*1.25,'短顶'),colorgreen;
大顶:=VAR1>20 AND FILTER(VAR1< REF(VAR1,1),5);
STICKLINE(大顶,VAR1+5,0,7,0),COLOR00FF00;
DRAWTEXT(大顶,VAR1*1.4,'大顶'),colorcyan;
VAR2:=HHV(VAR1>20,10);
危险:=VAR2 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20));
STICKLINE(危险,VAR1+10,0,4,0),colorcyan;
DRAWTEXT(危险,VAR1*1.68,'危险'),colorred;
注意止损:=VAR2 AND FILTER(VAR1< REF(VAR1,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2));
STICKLINE(注意止损,VAR1+6,0,3,0),colorgreen;
DRAWTEXT(注意止损,VAR1+10,'止损'),color0000AA;
短底:=VAR1<-9 AND VAR1> REF(VAR1,1),colorred;
STICKLINE(短底,VAR1,0,3,0),coloryellow;
大底:=VAR1<-20 AND FILTER(VAR1> REF(VAR1,1),5);
STICKLINE(短底,VAR1,0,7,0),color006666;
STICKLINE(短底,VAR1,0,6,0),color007777;
STICKLINE(短底,VAR1,0,5,0),color008888;
STICKLINE(短底,VAR1,0,4,0),color009999;
STICKLINE(短底,VAR1,0,3,0),color00aaaa;
STICKLINE(短底,VAR1,0,2,0),color00bbbb;
DRAWTEXT(短底+大底,VAR1-6,'底'),coloryellow;
底背离:K底背离+MACD底背离,nodraw;
底背离期:=COUNT(底背离,5),nodraw;
背离抄底:=(底背离期>0) AND (MACD金叉 OR KDJ金叉),nodraw;
买入准备:=VAR1<-9 AND VAR1> REF(VAR1,1) ,coloryellow;
抄底:(COUNT(短底+大底,PASTDAYS)>0 AND 最佳买点>0 ) OR 背离抄底>0,nodraw;
最佳抄底:(抄底) AND (MACD金叉 OR KDJ金叉),nodraw;
最佳抄底期:=COUNT(最佳抄底,PASTDAYS),nodraw;
抄底信号数:抄底+MACD金叉+KDJ金叉,nodraw;
DRAWICON(抄底,0,1);
DRAWICON(最佳抄底,-2,1);
DRAWTEXT(最佳抄底,-8,'抄底'),colorcyan;
DRAWTEXT(抄底 AND 最佳抄底<1 ,-8,'抄底'),coloryellow;
通:=MA(C,17),nodraw;
涨停:=(C-REF(C,1))/REF(C,1) >INCRATIO,nodraw;
期间涨停:HHV(涨停,DAYS),nodraw;
通金叉:LOW<通 AND HIGH>通,nodraw;
回马枪:(期间涨停) AND (J<风险区*0.9) AND (通金叉) AND ( ((KDJ金叉 OR KDJ势增) AND (MACD势增)) OR (MACD金叉 AND KDJ势增) ),nodraw;
DRAWICON(回马枪,VAR1-2,1);
DRAWTEXT(回马枪,VAR1-8,'抢'),coloryellow;
DRAWICON(回马枪 AND (KDJ金叉 OR MACD金叉),VAR1-6,1);
STICKLINE(涨停,0,VAR1,2,0),coloryellow;


同花顺短线抄底短顶副图指标 源码


[url=http://www.goodgupiao.com/gupiaogongshi/55545.html][B]同花顺短线抄底短顶副图指标 源码[/B][/url]