以下是通達信分時均價線公式主圖源碼(無源碼的請下載附件導(dǎo)入) C,COLORWHITE; ZSTJJ,COLORYELLOW; IF(ZSTJJ/DYNAINFO(3)>1.05,ZSTJJ,DRAWNULL),COLORRED,LINETHICK3; IF(ZSTJJ/DYNAINFO(3)<1.03,ZSTJJ,DRAWNULL),COLORGREEN; MA5:=MA.MA1#DAY; IF(BETWEEN(MA5,DYNAINFO(5),DYNAINFO(6)),MA5,DRAWNULL),COLORWHITE,LINETHICK2; DRAWTEXT_FIX(1,0,0,0,STRCAT('MA5:',STRCAT(VAR2STR(MA5,2),'元'))),COLORWHITE; IF(C>ZSTJJ,C,DRAWNULL),COLORRED,LINETHICK2; GL:=C/ZSTJJ; GLH:=GL=HHV(GL,0); GLL:=GL=LLV(GL,0); DRAWICON(FILTER(GLH AND GL>1.06,3),C,2); DRAWICON(FILTER(GLL AND GL<0.95,3),C,1); JV:=SUM(AMO,0)/100000000; DRAWTEXT_FIX(1,0,0.9,0,STRCAT('成交額:',STRCAT(VAR2STR(JV,2),'億'))),COLORFFFF00; 最高漲幅:=NK.莊O#DAY; DRAWTEXT_FIX(1,0.892,0,0,STRCAT('最高:',STRCAT(VAR2STR(最高漲幅,2),'%'))),COLORLIMAGENTA; 放量:=CROSS(SUM(V,0),NK.莊I#DAY); DRAWTEXT(放量,C,'放量'),COLORFFFF00; 今開:DYNAINFO(4); IF(今開>=C,今開,DRAWNULL),COLORFFFF00,LINETHICK2; IF(今開<C,今開,DRAWNULL),COLORRED,LINETHICK2; DRAWTEXT(ISLASTBAR,今開,'今開'),COLORWHITE; 昨半:NK.莊Z#DAY,COLORFF00FF; DRAWTEXT(ISLASTBAR,昨半,'昨半'),COLORFF00FF; 時間:=TIME2=100000; N:=BARSLAST(時間); CS1:CONST(IF(N,MAX(REF(HHV(H,0),N),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORFF00FF,LINETHICK2; CS2:CONST(IF(N,MIN(REF(LLV(L,0),N),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORGREEN,LINETHICK2; DRAWICON(CROSS(C,CS1),CS1,1); DRAWICON(CROSS(C,CS2),CS2,2); DRAWTEXT(ISLASTBAR,CS1,'左鋒'),COLOR00FFFF; DRAWTEXT(ISLASTBAR,CS2,'支撐'),COLORGREEN; Y:="NK.莊Y#DAY"; KJ6:REFDATE(Y,DATE),COLORCYAN,LINETHICK2; DRAWTEXT(ISLASTBAR,KJ6,'昨高'),COLORFFFF00; K:="NK.莊K#DAY"; KJ5:REFDATE(K,DATE),COLORYELLOW,LINETHICK2; DRAWTEXT(ISLASTBAR,KJ5,'昨收'),COLORYELLOW; 量能飽和:100*(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20)),NODRAW; DRAWRECTREL(100,30,390,50,RGB(0,200,200)); DRAWRECTREL(100,30,90+CONST(量能飽和*300/100),50,RGB(250,105,0)); DRAWTEXT_FIX(1,0,0.03,0,STRCAT(STRCAT('量能飽和度: ',CON2STR(量能飽和,1)),' % ')),COLORYELLOW; |
|