大智慧数字均线第二板主图指标公式

大智慧数字均线第二板主图指标公式:
IF BARstATUS=2 then

DRAWTEXTREL(20,20,'短线看牛熊。 '),colormagenta;

DRAWTEXTREL(20,80,'长线有云持股,无云休息。 '),colormagenta;

DRAWTEXTREL(20,140,'数字不变不要动! '),COLOR0055FF;

DRAWTEXTREL(20,200,'数字变大我高兴!数字变小多考虑! '),COLOR0055FF;

IF BARSTATUS=2 then

获利盘:=WINNER(CLOSE)*100;

IF BARSTATUS=2 then

平均成本:=COST(50);

日换手率:=vol/CAPITAL*100;

DRAWTEXTREL(20,700,'获利盘:'+获利盘+'% '),colormagenta;

DRAWTEXTREL(20,760,'平均成本:'+平均成本),colormagenta;

zg:=FINANCE2(35);{总股}

lta:=FINANCE2(37);{流通A}

sy:=FINANCE2(3);{收益}

sl:=DYNAINFO(39);{市盈率}

wf:=FINANCE2(8);{未分}

gj:=FINANCE2(7);{公积};

jz:=FINANCE2(4);{净资}

cw:='总股:'+zg+' 流通A:'+lta+' 收益:'+sy+' 市盈率:'+sl+' 未分:'+wf+' 公积:'+gj+' 净资:'+jz;

IF CATEGORY<>0 AND BARSTATUS=2 then

DRAWTEXTREL(20,900,BKNAME),COLOR0055FF;

DRAWTEXTREL(20,960,cw),COLOR0055FF;

均价:=(CLOSE+HIGH+LOW+LOW)/4;

p:=EMA(均价,9);

q:=EMA(REF(p,1),3);

换手1:=500*VOL/capital;

换手:=EMA(换手1,3);

close3:=ref(close,3);

close5:=ref(close,5);

close7:=ref(close,7);

close8:=ref(close,8);

close13:=ref(close,13);

close21:=ref(close,21);

jc:=(ref(c,3)+ref(c,5)+ref(c,7)+ref(c,8)+ref(c,13)+ref(c,21))/6;

参考:=SMA(jc,5,1);

参考价:=if(参考=0,c,参考);

aa:=if(c>=ref(c,3),1,0);

bb:=if(c>=ref(c,5),1,0);

cc:=if(c>=ref(c,7),1,0);

dd:=if(c>=ref(c,8),1,0);

ee:=if(c>=ref(c,13),1,0);

ff:=if(c>=ref(c,21),1,0);

gz2:=aa+bb+cc+dd+ee+ff;

kk:=0;

for i=1 TO 4 DO

kk:=kk+REF(gz2,i);

kkk:=kk/4;

aaaa:=v>=ref(v,3);

bbbb:=v>=ref(v,5);

cccc:=v>=ref(v,7);

dddd:=v>=ref(v,8);

eeee:=v>=ref(v,13);

ffff:=v>=ref(v,21);

价涨:=aa+bb+cc+dd+ee+ff>=4;

量涨:=aaaa+bbbb+cccc+dddd+eeee+ffff>=5;

持有:aa and 价涨 and 量涨,COLORWHITE,LINETHICK0;

拉升:aa and 价涨 and 量涨 and c>MA(c,30)and MA(v,30)>ref(MA(v,30),1) and MA(c,30)>ref(MA(c,30),1),COLORWHITE,LINETHICK0;

可能转强:STICKLINE(价涨 and p>q,p,q,换手,0),COLOR444444,LAYER7;

STICKLINE(价涨 and p>q,p,q,换手/5,1),COLOR444444,LAYER7;

有价有量:STICKLINE(价涨 and 量涨 and p>q ,p,q,换手,0),Color006600,LAYER7;

量价不一:STICKLINE(价涨 and 量涨 and p>q AND C<ref(C,1),p,q,换手/3,1),Color006600,LAYER7;

可以持有:STICKLINE(持有 and p>q,p,q,6,0),COLOR006666,LAYER7;

可能拉升:STICKLINE(拉升 and p>q,p,q,换手,0),COLOR660066,LAYER7;

STICKLINE(拉升 and p>q,p,q,换手/5,1),COLOR660066,LAYER7;

M5: EMA(CLOSE,5);

M10: EMA(CLOSE,10);

M30: EMA(CLOSE,30);

M60: EMA(CLOSE,60);

Var1:=EMA(CLOSE,3)-EMA(CLOSE,6)-(EMA(CLOSE,6)-EMA(CLOSE,12))*(-100);

Var2:=EMA(Var1,3);

Var5:=crOSS(Var1,Var2);

Var6:=CROSS(Var2,Var1);

STICKLINE(C>=O,l,H,0,0), COLOR0000FF,LAYER2;

STICKLINE(C<O,l,H,0,0), COLORFFFF00,LAYER2;

STICKLINE(C>=O,O,C,8,1), COLOR0000FF,LAYER2;

STICKLINE(C<O,O,C,8,0), COLORFFFF00,LAYER2;

STICKLINE(Var6,OPEN,CLOSE,10,0), COLORBLUE,LAYER0;{兰色熊K}

STICKLINE(Var5,OPEN,CLOSE,10,0), COLORYELLOW,LAYER0;{彩色牛K}

STICKLINE(Var5,OPEN,CLOSE-(CLOSE-OPEN)*0.33,10,0), COLORaaccdd,LAYER0;{彩色牛K}

STICKLINE(Var5,OPEN,CLOSE-(CLOSE-OPEN)*0.66,10,0), COLORRED,LAYER0;{彩色牛K}

DRAWTEXT(c>0,(O+C)/2,NUMTOSTRN(gz2 ,0 )),color888888,LAYER0,ALIGN1,VALIGN1;{彩色牛K}

乖离5:=(c-M5)/M5*100;

斜率5:=atan((M5/ref(M5,1)-1)*100)*57.29583;

速度5:=sma(ema((M5-ref(M5,1))/ref(M5,1),3)*100,3,1);

加速度5:=WMA((速度5-ref(速度5,1)),3);

斜率10:=atan((M10/ref(M10,1)-1)*100)*57.29583;

乖离30:=(c-M30)/M30*100;

斜率30:=atan((M30/ref(M30,1)-1)*100)*57.29583;

强势狙击:=filter(斜率30>30 and 斜率10>45 and cross(斜率5,60),10);

加仓:=filter(count(cross(斜率5,30),5)>=1 and M5>ref(M5,1) and 乖离30>ref(乖离30,1) and M10>ref(M10,1)

and 加速度5>ref(加速度5,1) and 速度5>ref(速度5,1) ,10) ;

drawtext(加仓 AND 持有 ,low*0.98,'▲'),color00FFFF,ALIGN1;

JC:=cross(0,乖离5) and 乖离30<ref(乖离30,1) and M10>ref(M10,1) ;

减仓:=filter(JC,10);

MR:=count(cross(乖离5,0),3)>=1 and 乖离30>ref(乖离30,1) and M5>ref(M5,1) and (c/ref(c,1)-1)*100>5 and ref(c,1)<M30;

买入:=filter(MR,10) OR filter(kkk=0 and gz2>0 and c>REF(c,1),10);

清仓:=filter(count(cross(30,斜率5),5)>=1 and (c>M30 or O>M30)

and M5<ref(M5,1) and 乖离30<ref(乖离30,1) and M10<ref(M10,1),10)

OR filter((kkk=6 and gz2<6),10);

drawtext(减仓,high*1.02,'减'),colorcyan,LAYER0,ALIGN1;

drawtext(买入,low*0.98,'买'),coloryellow,LAYER0,ALIGN1;

drawtext(清仓 ,high*1.02,'卖'),colorgreen,LAYER0,ALIGN1;

drawtext(强势狙击,LOW*0.98,'狙'),coloryellow,LAYER0,ALIGN1;