今天跟大家分享一個剛幫朋友編寫的一個換手率指標,會直接在盤面上顯示了我們平時最關心的一些數(shù)據(jù)信息,喜歡使用換手率的朋友應該會喜歡這個指標,沒有未來函數(shù),手機和電腦都可以使用,源碼在下面,自己復制就行;(源碼有些長) 換手率主圖指標源碼: R1:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3)); R2:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01); R3:=IF(R2,1,(R1<(DYNAINFO(5)+0.01) && R1>(DYNAINFO(6)-0.01)));{籌碼分布} RH1:=0.01*AMOUNT/VOL;{個股均點} RH2:=(H+L+C)/3;{大市中點} RH3:=100*VOL/(FINANCE(7)/100);{換手率} RH5:=INDEXA; STICKLINE(O>C,C,O,3,1),COLOR00CC00; 均:=IF(R3,RH1,RH2); 換:=IF(R3,RH3,RH5); A1:=BARSLAST(L=LLV(L,360))+1; A2:=BARSLAST(L=LLV(L,360)); A3:=CONST(REF(L,A2)); A5:=BARSLAST(H=HHV(H,A2)); A6:=0.01*SUM(AMOUNT,A1)/SUM(V,A1); A7:=BARSLAST(H=HHV(H,A1)); A8:=CONST(REF(H,A7)); A9:=CONST(A7-A1+2); A10:=SUM(換,A1); A11:=CONST(REF(A10,A7));{前總換手} A12:=CONST(REF(A1,A7)),NODRAW;{前總日數(shù)} ①浪升幅:INTPART(CONST((A8-A3)/A3*100)),NODRAW,COLORMAGENTA; ①浪總日數(shù):INTPART(A12),NODRAW,COLORWHITE; ①浪總換手:INTPART(A11),NODRAW,COLORCYAN; 高①點A:IF(CURRBARSCOUNT<=CONST(A1)&&CURRBARSCOUNT>=CONST(A7+1),CONST(IF(A7+1,A8,A8)),DRAWNULL),COLORMAGENTA,DOTLINE; H1:=CONST(REF(L,A7)); H2:STICKLINE(CURRBARSCOUNT=CONST(A7+1),H1/1.01,A3,0.00001,-1),COLORYELLOW; A13:=(A8+A3)/2; A15:=(A8+A13)/2; A16:=(A13+A3)/2; 升75%:IF(CURRBARSCOUNT<=CONST(A1)&&CURRBARSCOUNT>=CONST(A7+1),CONST(IF(A7+1,A15,A15)),DRAWNULL),COLORLIGRAY,DOTLINE; 升50%:IF(CURRBARSCOUNT<=CONST(A1)&&CURRBARSCOUNT>=CONST(A7+1),CONST(IF(A7+1,A13,A13)),DRAWNULL),COLORMAGENTA; 升25%:IF(CURRBARSCOUNT<=CONST(A1)&&CURRBARSCOUNT>=CONST(A7+1),CONST(IF(A7+1,A16,A16)),DRAWNULL),COLORLIGRAY,DOTLINE; 前低點A:IF(CURRBARSCOUNT<=CONST(A1)&&CURRBARSCOUNT>=CONST(A7+1),CONST(IF(A7+1,A3,A3)),DRAWNULL),COLORGREEN; A21:=IF(均<=A8&&均>=A15,換,DRAWNULL); A④區(qū)換:=INTPART(SUM(A21,A1)); A④區(qū)換手:=CONST(REF(A④區(qū)換,A7)),NODRAW,COLORYELLOW; A23:=IF(均<=A15&&均>=A13,換,DRAWNULL); A③區(qū)換:=INTPART(SUM(A23,A1)); A③區(qū)換手:=CONST(REF(A③區(qū)換,A7)),NODRAW,COLORYELLOW; A26:=IF(均<=A13&&均>=A16,換,DRAWNULL); A②區(qū)換:=INTPART(SUM(A26,A1)); A②區(qū)換手:=CONST(REF(A②區(qū)換,A7)),NODRAW,COLORYELLOW; A28:=IF(均<=A16&&均>=A3,換,DRAWNULL); A①區(qū)換:=INTPART(SUM(A28,A1)); A①區(qū)換手:=CONST(REF(A①區(qū)換,A7)),NODRAW,COLORYELLOW; DRAWTEXT(A2=0&&A2<2,高①點A/1.02,'A④區(qū)換手%:'),COLORYELLOW; DRAWNUMBER(A2>0&&A2<2,高①點A/1.03,A④區(qū)換手),COLORYELLOW; DRAWTEXT(A2=0&&A2<2,升75%/1.02,'A③區(qū)換手%:'),COLORYELLOW; DRAWNUMBER(A2>0&&A2<2,升75%/1.03,A③區(qū)換手),COLORYELLOW; DRAWTEXT(A2=0&&A2<2,升50%/1.03,'A②區(qū)換手%:'),COLORYELLOW; DRAWNUMBER(A2>0&&A2<2,升50%/1.05,A②區(qū)換手),COLORYELLOW; DRAWTEXT(A2=0&&A2<2,升25%/1.03,'A①區(qū)換手%:'),COLORYELLOW; DRAWNUMBER(A2>0&&A2<2,升25%/1.05,A①區(qū)換手),COLORYELLOW; V1:=BARSLAST(H=HHV(H,A1)),NODRAW; V2:=CONST(REF(H,V1)),NODRAW; V3:=CONST(LLV(L,V1)),NODRAW; ②浪最低跌幅:(V3-V2)/V2*100,NODRAW,COLORCYAN; ②浪總日數(shù):INTPART(V1),NODRAW,COLORWHITE; ②浪總換手:INTPART(SUM(換,V1)),NODRAW,COLORCYAN; V13:=(V2+A3)/2; V15:=(V2+V13)/2; V16:=(V13+A3)/2; 高①點B:IF(CURRBARSCOUNT<=CONST(A7+1),CONST(IF(A7,V2,V2)),DRAWNULL),COLORMAGENTA; 跌25%:IF(CURRBARSCOUNT<=CONST(A7+1),CONST(IF(A7,V15,V15)),DRAWNULL),COLORLIGRAY,DOTLINE; 跌50%:IF(CURRBARSCOUNT<=CONST(A7+1),CONST(IF(A7,V13,V13)),DRAWNULL),COLORMAGENTA; 跌75%:IF(CURRBARSCOUNT<=CONST(A7+1),CONST(IF(A7,V16,V16)),DRAWNULL),COLORLIGRAY,DOTLINE; 前低點B:IF(CURRBARSCOUNT<=CONST(A7+1),CONST(IF(A7,A3,A3)),DRAWNULL),COLORGREEN; DRAWTEXT_FIX(ISLASTBAR,0.35,0.15,0,CODE),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.42,0.15,0,STKNAME),COLORRED; DRAWTEXT_FIX(ISLASTBAR,0.53,0.15,0,HYBLOCK),COLORCYAN; DRAWTEXT_FIX(ISLASTBAR,0.62,0.15,0,DYBLOCK),COLORB4EEB4; DRAWTEXT_FIX(ISLASTBAR,0.35,0.25,0,GNBLOCK),COLORWHITE; V21:=IF(均<=V2&&均>=V15,換,DRAWNULL); V①區(qū)換手:=CONST(INTPART(SUM(V21,V1))),NODRAW,COLORLIGRAY; V23:=IF(均<=V15&&均>=V13,換,DRAWNULL); V②區(qū)換手:=CONST(INTPART(SUM(V23,V1))),NODRAW,COLORCYAN; V26:=IF(均<=V13&&均>=V16,換,DRAWNULL); V③區(qū)換手:=CONST(INTPART(SUM(V26,V1))),NODRAW,COLORLIGRAY; V28:=IF(均<=V16&&均>=V3,換,DRAWNULL); V④區(qū)換手:=CONST(INTPART(SUM(V28,V1))),NODRAW,COLORCYAN; DRAWTEXT(V1>0&&V1<2,高①點B/1.02,'V①區(qū)換手%:'),COLORCYAN; DRAWNUMBER(V1>0&&V1<2,高①點B/1.03,V①區(qū)換手),COLORCYAN; DRAWTEXT(V1>0&&V1<2,跌25%/1.02,'V②區(qū)換手%:'),COLORCYAN; DRAWNUMBER(V1>0&&V1<2,跌25%/1.03,V②區(qū)換手),COLORCYAN; DRAWTEXT(V1>0&&V1<2,跌50%/1.03,'V③區(qū)換手%:'),COLORCYAN; DRAWNUMBER(V1>0&&V1<2,跌50%/1.05,V③區(qū)換手),COLORCYAN; DRAWTEXT(V1>0&&V1<2,跌75%/1.03,'V④區(qū)換手%:'),COLORCYAN; DRAWNUMBER(V1>0&&V1<2,跌75%/1.05,V④區(qū)換手),COLORCYAN; 換手率主圖指標使用方法: 1、換手率主圖直接在盤面上顯示了我們平時最關心的一些數(shù)據(jù)信息; 2、甚至還通過這個戰(zhàn)法分出上下各四個區(qū),每個區(qū)的換手率都有統(tǒng)計; 如果一直在使用換手率的朋友使用這個指標肯定會如魚得水,學習換手率的朋友也能更容易入門。 |
|
來自: 信息熵 > 《網(wǎng)絡》