ASDF主图,和谐通达信公式源码分享,漂亮的指标
ASDF主图
N:=150;M:=3;高:=CONST(REF(HHV(H,N),M)); 低:=CONST(REF(LLV(L,N),M));色彩峰:=高-低;STICKLINE(色彩峰>0,低,低+色彩峰*1.05,10,0),COLORFF0000;STICKLINE(色彩峰>0,低,低+色彩峰*0.9,10,0),COLORFF1111;STICKLINE(色彩峰>0,低,低+色彩峰*0.85,10,0),COLORFF2222;STICKLINE(色彩峰>0,低,低+色彩峰*0.8,10,0),COLORFF3333;STICKLINE(色彩峰>0,低,低+色彩峰*0.75,10,0),COLORFF4444;STICKLINE(色彩峰>0,低,低+色彩峰*0.7,10,0),COLORFF5555;STICKLINE(色彩峰>0,低,低+色彩峰*0.65,10,0),COLORFF6666;STICKLINE(色彩峰>0,低,低+色彩峰*0.6,10,0),COLORFF7777;STICKLINE(色彩峰>0,低,低+色彩峰*0.55,10,0),COLORFF8888;STICKLINE(色彩峰>0,低,低+色彩峰*0.5,10,0),COLORFF9999;STICKLINE(色彩峰>0,低,低+色彩峰*0.45,10,0),COLORFFAAAA;STICKLINE(色彩峰>0,低,低+色彩峰*0.4,10,0),COLORFFBBBB;STICKLINE(色彩峰>0,低,低+色彩峰*0.35,10,0),COLORFFCCCC;STICKLINE(色彩峰>0,低,低+色彩峰*0.3,10,0),COLORFFDDDD;STICKLINE(色彩峰>0,低,低+色彩峰*0.25,10,0),COLORFFEEEE;高1:=REF(HHV(H,120),3);低1:=REF(LLV(L,120),3);H1:=高1-(高1-低1)*0.191; H2:=高1-(高1-低1)*0.382; H3:=高1-(高1-低1)*0.5; H4:=高1-(高1-低1)*0.618; H5:=高1-(高1-低1)*0.809;突破:=REF(EMA(C,14),1);A1X:=(EMA(C,10)-突破)/突破*100;基准:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1));STICKLINE(A1X>=0,基准,突破,10,0),COLOR000099;STICKLINE(A1X<0,基准,突破,10,0),COLOR320000;西:=(3*CLOSE+OPEN+LOW+HIGH)/6;电:(20*西+19*REF(西,1)+18*REF(西,2)+17*REF(西,3)+16*REF(西,4)+15*REF(西,5)+14*REF(西,6)+13*REF(西,7)+12*REF(西,8)+11*REF(西,9)+10*REF(西,10)+9*REF(西,11)+8*REF(西,12)+7*REF(西,13)+6*REF(西,14)+5*REF(西,15)+4*REF(西,16)+3*REF(西,17)+2*REF(西,18)+REF(西,20))/210,COLORYELLOW;点:MA(电,5),COLORRED;DRAWBAND(电,RGB(223,0,41),点,RGB(91,189,43));DRAWKLINE(H,O,L,C);ZKP:=IF(C>REF(C,1),REF(C,1),DRAWNULL);ZSP:=IF(C>REF(C,1),C,DRAWNULL);DKP:=IF(C<=REF(C,1),REF(C,1),DRAWNULL);DSP:=IF(C<=REF(C,1),C,DRAWNULL);DRAWKLINE(H,DKP,L,DSP);STICKLINE(C<=REF(C,1),DKP,DSP,3.05,0),COLORBLUE;STICKLINE(C<=REF(C,1),DKP,DSP,2.2,0),COLORFF7700;STICKLINE(C<=REF(C,1),DKP,DSP,1.5,0),COLORFF9900;STICKLINE(C<=REF(C,1),DKP,DSP,0.5,0),COLORFFBB00;DRAWKLINE(H,ZKP,L,ZSP);STICKLINE(C>REF(C,1),ZKP,ZSP,3.05,0),COLOR000099;STICKLINE(C>REF(C,1),ZKP,ZSP,2.2,0),COLOR0000CC;STICKLINE(C>REF(C,1),ZKP,ZSP,1.5,0),COLOR0000FF; STICKLINE(C>REF(C,1),ZKP,ZSP,0.5,0),COLORCC66FF;STICKLINE(V/REF(V,1)>2 AND CLOSE>=OPEN,ZKP,ZSP,3,0),COLOR0055FF;STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,3,0),COLORYELLOW;STICKLINE((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,3,0),COLORGREEN;G:=IF(HIGH=HHV(HIGH,3),1,0);D:=IF(LOW=LLV(LOW,3),1,0);S:=IF(REF(G,2)=1 AND REF(G,1)=0 AND G=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(G,2)=1 AND REF(G,1)=0 AND G=0)));X:=IF(REF(D,2)=1 AND REF(D,1)=0 AND D=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(D,2)=1 AND REF(D,1)=0 AND D=0)));K1:=IF(HIGH>=MA(CLOSE,1),S,REF(S,BARSLAST(HIGH>MA(CLOSE,1))));K2:=IF(LOW<=MA(CLOSE,1),X,REF(X,BARSLAST(LOW<=MA(CLOSE,1))));C1:=REF(CLOSE,1)<=K1 AND CLOSE>K1;C2:=REF(CLOSE,1)>=K2 AND CLOSE
感谢感谢!楼主功德无量,哈哈! 群众力量就是大,分享万岁!
页:
[1]