当前位置: 网站首页 > 股票软件公式 > 同花顺公式 > 文章 当前位置: 同花顺公式 > 文章

同花顺源码:抄底专用指标,主散筹码斜率,无极DMI

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

1、抄底专用指标

M:=55;
m:=21;
n:=21;
DC:=INDEXC;
DC1:=3;
DV:=INDEXC;
var11:=ZIG(DC1,6)>REF(ZIG(DC1,6),1) AND REF(ZIG(DC1,6),1)<=REF(ZIG(DC1,6),2) AND REF(ZIG(DC1,6),2)<=REF(ZIG(DC1,6),3);
var12:=ZIG(DC1,6)<REF(ZIG(DC1,6),1) AND REF(ZIG(DC1,6),1)>=REF(ZIG(DC1,6),2) AND REF(ZIG(DC1,6),2)>=REF(ZIG(DC1,6),3);
var13:=ZIG(DC1,22)>REF(ZIG(DC1,22),1) AND REF(ZIG(DC1,22),1)<=REF(ZIG(DC1,22),2) AND REF(ZIG(DC1,22),2)<=REF(ZIG(DC1,22),3);
var14:=ZIG(DC1,22)<REF(ZIG(DC1,22),1) AND REF(ZIG(DC1,22),1)>=REF(ZIG(DC1,22),2) AND REF(ZIG(DC1,22),2)>=REF(ZIG(DC1,22),3);
var15:=ZIG(DC1,51)>REF(ZIG(DC1,51),1) AND REF(ZIG(DC1,51),1)<=REF(ZIG(DC1,51),2) AND REF(ZIG(DC1,51),2)<=REF(ZIG(DC1,51),3);
var16:=ZIG(DC1,51)<REF(ZIG(DC1,51),1) AND REF(ZIG(DC1,51),1)>=REF(ZIG(DC1,51),2) AND REF(ZIG(DC1,51),2)>=REF(ZIG(DC1,51),3);
var17:=ZIG(DC1,72)>REF(ZIG(DC1,72),1) AND REF(ZIG(DC1,72),1)<=REF(ZIG(DC1,72),2) AND REF(ZIG(DC1,72),2)<=REF(ZIG(DC1,72),3);
var18:=ZIG(DC1,72)<REF(ZIG(DC1,72),1) AND REF(ZIG(DC1,72),1)>=REF(ZIG(DC1,72),2) AND REF(ZIG(DC1,72),2)>=REF(ZIG(DC1,72),3);
买:=(var11+var13+var15+var17);
卖:=(var12+var14+var16+var18);
新价:DC,colorwhite;//
DRAWTEXT(买>0,DC*0.99,'必进'),colorred,;
DRAWTEXT(卖>0,DC*1.02,'清仓'),colorgreen,;
b:=TROUGHBARS(DC1,5,1)=0;
e:=PEAKBARS(DC1,5,1)=0;
DRAWICON(b,INDEXL,1),colorred;
DRAWICON(e,INDEXH,2);
DRAWNUMBER(e,INDEXC*0.98,TOSTRING(INDEXH,2));//画数字
DRAWNUMBER(b,INDEXC*0.98,TOSTRING(INDEXL,2));//画数字
突破:REF(EMA(DC,14),1),coloryellow;//
A1X:=(EMA(DC,10)-突破)/突破*100;
多方:=IF(A1X>=0,REF(EMA(DC,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);
空方:=IF(A1X<0,REF(EMA(DC,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);
STICKLINE(A1X>=0,多方,突破,0,0),COLOR000099;//柱线
STICKLINE(A1X<0,空方,突破,0,0),COLOR00CC66;//柱线
均价线:SUM(DC*DV,240)/SUM(DV,240),colormagenta;//
AA:=ZIG(DC1,5),coloryellow;
DIFF1:=-(EMA(AA,26) - EMA(AA,12));
WWW58188COM:=-(EMA(DIFF1,9));
DEA1:=-(EMA(DIFF1,9));
MACD1:=2*(DIFF1-DEA1);
//转向变盘建仓
X:=IF(MACD1<0 AND REF(MACD1,2)>REF(MACD1,1) AND MACD1>REF(MACD1,1),1,0);
DRAWTEXT(X,INDEXC*0.97,"建仓"),coloryellow;
//量价指标
VPT:=SUM(DV/EMA(DV,N)*(DC-REF(DC,1))/REF(DC,1),0);
MAVPT:=EMA(VPT,M);
//均价线金叉




2、主散筹码斜率,筹码类公式结合斜率

五日均线的差值,判断上升过程的陡峭程度,越陡上升越快( 股 民 学 院 : http://www.58188.net )

操作价位:=CLOSE;
VAR1:=1;
VAR55:=LLV(LOW,8);
VAR66:=HHV(HIGH,8);
VAR77:=(VAR66-VAR55)/10;
VAR88:=SMA((CLOSE-VAR55)/VAR77,20,1);
VARA:=3*VAR88-2*SMA(VAR88,15,1);
散户筹码集中度:=(10-VARA)*VAR1*6;
机构筹码集中度:=EMA(WINNER(C)*70,3);
主力筹码:=10*WINNER(CLOSE*0.9)*8;
十天主力筹码:=EMA(主力筹码,10);
X4:=EMA(C,6);
斜6:(X4-REF(X4,1))/REF(X4,1)*100, colorgray;
X5:=EMA(C,12);
斜12:(X5-REF(X5,1))/REF(X5,1)*100, colorgray;
X6:=EMA(C,18);
斜18:(X6-REF(X6,1))/REF(X6,1)*100, colorgray;
IF(斜6>斜12 AND 斜12>斜18) res:"成功", colorred;
ELSE res:"失败", colorred;
哔:=(主力筹码-十天主力筹码)/十天主力筹码, coloryellow;
量:=(VOL-REF(VOL,1))/REF(VOL,1), colormagenta;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
IF(MACD>0 AND DIFF>0 AND MACD>DIFF) 量能柱:DIFF-DEA;
ELSE IF(MACD>0 AND DIFF>0 AND MACD<DIFF AND MACD>DEA) 量能柱:MACD-DEA;
ELSE 量能柱:"XX";
量能柱比:=量能柱/REF(量能柱,1);
A1:=MA(CLOSE,5);
A2:=MA(CLOSE,10);
A3:=MA(CLOSE,20);
A4:=MA(CLOSE,30);
A5:=MA(CLOSE,60);
A6:=MA(CLOSE,120);
P1:=5;
P2:=13;
P3:=34;
JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));
DDD:=(DYNAINFO(5)<0.01 OR DYNAINFO(6)<0.01);
JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) AND JJJ>(DYNAINFO(6)-0.01)));
CYC短:=IF(JJJT,0.01*EMA(AMOUNT,P1)/EMA(VOL,P1),EMA((H+L+C)/3,P1));
CYC中:=IF(JJJT,0.01*EMA(AMOUNT,P2)/EMA(VOL,P2),EMA((H+L+C)/3,P2));
CYC长:=IF(JJJT,0.01*EMA(AMOUNT,P3)/EMA(VOL,P3),EMA((H+L+C)/3,P3));
CYC∞:=IF(JJJT,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((H+L +C)/3,120));
水平面:=MA(CLOSE,60);
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:=EMA(RSV,3);
D:=MA(K,3);
IF(A2>REF(A2,1) AND A3>REF(A3,1) AND A4>REF(A4,1) AND CLOSE>A6 AND CLOSE>=A1 AND CYC短>CYC中 AND  CYC中>CYC长) REFF:'OK',colorred;
ELSE REFF:'NO',colorred;
IF(CLOSE>A1)  五日:='上';
ELSE 五日:='下';
DIFF比:DIFF/REF(DIFF,1),colorred;
五日比:=ABS(A1-REF(A1,1))/ABS(REF(A1,1)-REF(A1,2)),colorred;
主力比:=ABS((机构筹码集中度-REF(机构筹码集中度,1)))/ABS((散户筹码集中度-REF(散户筹码集中度,1))),colorred;
VAR1:=LLV(LOW,13);
VAR2:=HHV(HIGH,13);
VAR3:=SMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5,1);
VAR4:=SMA((VAR2-CLOSE)/(VAR2-VAR1)*100,5,1);
DRAWBAND(VAR3,RGB(155,50,50),50,RGB(0,100,50));
主力:=VAR3,colorred;
散户:=VAR4,colorgreen;
VAR5:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),5,1)*100;
操作:=EMA(VAR5,3),coloryellow;
主力操作差:=ABS(主力-操作)/ABS(REF(主力,1)-REF(操作,1));
FFEA差:DIFF-DEA;
MACD比:MACD/REF(MACD,1);
五十比:=A1/A2;
 


3、无极DMI

n:=12;

m:=6;
TR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=SUM(IF(HD>0 AND HD>LD,HD,0),N);
DMM:=SUM(IF(LD>0 AND LD>HD,LD,0),N);
PDI:= DMP*100/TR;
MDI:= DMM*100/TR;
ADX:= MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:=(ADX+REF(ADX,M))/2;
VAR1:=PDI;
VAR2:=MDI;
VAR3:=VAR1>65 AND VAR1>REF(VAR1,1);
VAR4:=LLV(VAR1,0);
VAR5:=BARSLAST(VAR4=VAR1);
VAR6:=(0-REF(VAR2,4))/(VAR4-REF(VAR2,VAR5))>2;
VAR7:=VAR1>REF(VAR1,1);
VAR8:=VOL>2*MA(VOL,30);
VAR9:=ADX;
VARA:=ADXR;
VARB:=CLOSE>MA(CLOSE,30) AND CLOSE<MA(CLOSE,30)*1.04;
VARC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);
VARD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));
diff:=EMA(C,7)-EMA(C,21);
VARE:=0-DIFF;
VARF:=TROUGHBARS(3,15,1)<4;
VAR10:=EMA(CLOSE,30)>REF(EMA(CLOSE,30),2);
VAR11:=IF(VARF=1,50,0);
VAR12:=CROSS(VAR2,VAR1) AND CROSS(VARA,VAR9);
VAR13:=CROSS(VAR2,VAR1) AND CROSS(VAR9,VARA);
VAR14:=VARB AND VARC AND VARD AND VAR10 AND VAR6 AND VAR7 AND VAR8*50;
VAR15:=BARSLAST(CROSS(VAR2,VAR1)=1);
VAR16:=BARSLAST(CROSS(VAR1,VAR2)=1);
VAR17:=HHV(VAR1,VAR16);
VAR18:=BARSLAST(VAR1=VAR17);
DK:EMA((CLOSE-MA((2*CLOSE+HIGH+LOW)/4,30))/MA((2*CLOSE+HIGH+LOW)/4,30)*100,3),colorwhite;
ll:0,colorred;
STICKLINE(FILTER(VARF=1,5) AND DK<-10,10,0,6,0),colorred;
STICKLINE(FILTER(VARF=1,5),10,0,3,0),color00ff00;
VAR19:=VAR3 OR VAR12 OR VAR13*100;
VAR1A:=VAR13*100;
DRAWICON(FILTER(VARF=1,3),10,'buy');
DRAWTEXT(FILTER(VARF=1,3),2,'`LDJJ'),coloryellow;
STICKLINE(DK<-10,0,DK,1,0),colorffff00;
STICKLINE(DK>10,0,DK,1,0),coloryellow;

上一篇:同花顺源码:抄底专用指,主散筹码斜率,无极DMI

下一篇:同花顺源码精选:博士策略,抄底高抛低吸组合,顺势而为