【大智慧】极品黄金(上涨家数、黑马线、趋势线)-指标公式源码{K(1,1,3);}DRAWGBKLAST(C0,STRIP(RGB(90,90,90),RGB(0,0,0),0));ema13:ema(c,13),colorblue,linethick2;ema34:ema(c,34),colorred,linethick2;ema55:ema(c,55),coloryellow,linethick2;ema89:ema(c,89),colorwhite,linethick2;T:=BARSLAST(DISPSTATUS=1)+1;A:=DISPSTATUS=2;HH:=HHV(H,T);LL:=LLV(L,T);HL:=HH-LL;wH:=HHVBARS(H,T);wL:=LLVBARS(L,T);KK:=wH-wL;mHL:=HH-HL*0.5;ifK=1thenbeginHL191:=(HH-LL)*0.191;HL382:=(HH-LL)*0.382;HL618:=(HH-LL)*0.618;HL809:=(HH-LL)*0.809;ifKK0thenbegina1:=HH-HL191;a2:=HH-HL382;a3:=HH-HL618;a4:=HH-HL809;endelsebegina1:=LL+HL191;a2:=LL+HL382;a3:=LL+HL618;a4:=LL+HL809;endendifk=1thenbeginHL125:=(HH-LL)*0.125;HL250:=(HH-LL)*0.25;HL375:=(HH-LL)*0.375;HL625:=(HH-LL)*0.625;HL750:=(HH-LL)*0.75;HL875:=(HH-LL)*0.875;ifkk0thenbeginb1:=HH-HL125;b2:=HH-HL250;b3:=HH-HL375;b4:=HH-HL625;b5:=HH-HL750;b6:=HH-HL875;endelsebeginb1:=LL+HL125;b2:=LL+HL250;b3:=LL+HL375;b4:=LL+HL625;b5:=LL+HL750;b6:=LL+HL875;endendDRAWTEXT(AandK3,HH,'最高价:'+HH),ALIGN2,colorgreen;DRAWTEXT(AandK3,LL,'最低价:'+ll),ALIGN2,VALIGN2,colorgreen;DRAWTEXT(AandK3,mHL,'50%:'+mHL),ALIGN2,color00ffff;DRAWTEXT(AandK=1,a1,'0.191:'+NUMTOSTRN(a1,2)),ALIGN2,color00ffff;DRAWTEXT(AandK=1,a2,'0.382:'+NUMTOSTRN(a2,2)),ALIGN2,color00ffff;DRAWTEXT(AandK=1,a3,'0.618:'+NUMTOSTRN(a3,2)),ALIGN2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 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄'),ALIGN2,colorff0000,linethick7;DRAWTEXT(AandK=1,a1,'﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊'),ALIGN2,color208FFF,linethick0;DRAWTEXT(AandK=1,a2,'﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊'),ALIGN2,color208FFF,linethick0;DRAWTEXT(AandK=1,a3,'﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊'),ALIGN2,color208FFF,linethick0;DRAWTEXT(AandK=1,a4,'﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊'),ALIGN2,color208FFF,linethick0;DRAWTEXT(AandK=1,b1,'﹉﹉﹉﹉'),ALIGN2,color00FF00;DRAWTEXT(AandK=1,b2,'﹉﹉﹉﹉'),ALIGN2,color00ff00;DRAWTEXT(AandK=1,b3,'﹉﹉'),ALIGN0,color00ff00;DRAWTEXT(AandK=1,b4,'﹉﹉'),ALIGN0,color00ff00;DRAWTEXT(AandK=1,b5,'﹉﹉﹉﹉'),ALIGN2,color00ff00;DRAWTEXT(AandK=1,b6,'﹉﹉﹉﹉'),ALIGN2,color00FF00;OO:=ma(O,22);j:=kdj.j#DAY;CC:=ma(c,22);hs:=vol/CAPITAL*100;jj:=(H+L+C)/3;qj0:=vol/IF(H=L,4,H-L);qj1:=IF(CAPITAL=0,qj0*(jj-MIN(C,O)),qj0*(MIN(O,C)-L));qj2:=IF(CAPITAL=0,qj0*(MIN(O,C)-L),qj0*(jj-MIN(C,O)));qj3:=qj0*(H-MAX(O,C));qj4:=qj0*(MAX(C,O)-jj);qj5:=qj1+qj2;qj6:=qj3+qj4;DD:=(qj5-qj6)/(qj5+qj6)*100;DDX:=((qj1+qj2)-(qj3+qj4))/sum(vol,10)*100;DDZ:=DD*17;DDY:=((qj2+qj4)-(qj1+qj3))/sum(vol,10)*100;bb:=(cross(j,0)and((ddx0andddy0)orDDZ400));bbd:=EMA(总0#WEEK,2)/sum(IF(CAPITAL=0,ref(INDEXA,1),ref(vol,1)),5)*100;XH1:=ref(bbd,1)-15andbbdref(bbd,1)andbbd-10;XH2:=ref(bbd,1)=15andbbdref(bbd,1)andbbd10;Q6:=atan((MA(C,5)/ref(MA(C,5),1)-1)*100)*57.3;Q2:=atan((MA(C,13)/ref(MA(C,13),1)-1)*100)*57.3;Q1:=atan((MA(C,23)/ref(MA(C,23),1)-1)*100)*57.3;Q:=atan((MA(C,34)/ref(MA(C,34),1)-1)*100)*57.3;Q3:=atan((MA(C,68)/ref(MA(C,68),1)-1)*100)*57.3;Q5:=atan((MA(C,250)/ref(MA(C,250),1)-1)*100)*57.3;STICKLINE(C=REF(c,1),H,L,0,0),COLOR0000FF;STICKLINE(C=REF(c,1),C,O,8,0),COLOR0000bb;STICKLINE(C=REF(c,1),C,O,5,0),COLOR0000dd;STICKLINE(C=REF(c,1),C,O,3,0),COLOR0000ee;STICKLINE(C=REF(c,1),C,O,1,0),COLOR0000ff;STICKLINE(CREF(c,1),H,L,0,0),COLORFFFF00;STICKLINE(CREF(c,1),C,O,8,0),COLOR999900;STICKLINE(CREF(c,1),C,O,5,0),COLORbbbb00;STICKLINE(CREF(c,1),C,O,3,0),COLORdddd00;STICKLINE(CREF(c,1),C,O,1,0),COLORFFFF00;STICKLINE(bbd0,CC,OO,8,0),COLORFF00FF;STICKLINE(bbd0,CC,OO,8,0),COLOR00FF00;DRAWICON(XH1,l*0.98,7);DRAWICON(XH2,h*1.02,8);DRAWTEXT(bb,L*0.98,'点钱'),COLOR00FFFF;DRAWTEXTREL(20,0,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+'家'),COLOR0066FF;DRAWTEXTREL(180,0,'下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+'家'),COLOR99FF99;DRAWTEXTREL(340,0,'平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)+'家'),COLOREEEEEE;DRAWTEXTREL(20,50,STKLABEL+''+STKNAME+''+STRLEFT(BKNAME,40)),ColorFFB060;x:=BARSLAST(DISPSTATUS=1)+1;ah:=hhvall(hhv(h,x));al:=llvall(llv(l,x));x1:=(C+L+H)/3;bb13:=atan(ema(x1,13)-ref(ema(x1,13),1))*3.1416*10;ema8:=ema(c,8);x1:=(C+L+H)/3;bb13:=atan(ema(x1,13)-ref(ema(x1,13),1))*3.1416*10;ema8:=ema(c,8);AA1:=AMOUNT/V;BB1:=LAA1*0.9;CC1:=(C-REF(C,1))/REF(C,1)*1001.2;DD1:=LMA(C,5)*0.921;EE1:=VMA(V,5)*1.5;FF1:=BB1ANDCC1ANDDD1ANDEE1;DRAWTEXT(ff1,(LOW*0.99),'老鼠仓'),Color4080FF;A51:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);黑马线:=EMA(A51,5);A5