1.數(shù)字資金圖部分,總的來說,上部(橫向)和下部(縱向)資金性質不同。上部是主力;下部是主動;2.流入,流出資金,是主動,單位:萬元; 3.DDE數(shù)據(jù),是主力; 4.主力買占比=主力逐筆買入量/(主力逐筆買入量+主力逐筆賣出量)*100,單位是百分數(shù);在通達信,主力逐筆就是主力,而非主動; 5.主力活躍度=(主力逐筆買入量+主力逐筆賣出量)/流通盤*100。單位是百分數(shù); 6.主力凈資=主力買入資金-主力賣出資金。單位是萬元; 7.主主買比,就是主力主動買占比,是主力主動買資金占主力主動買資金與主力主動賣資金之和的比值,單位:%; 8.主力主動十紅,是大宗流入十紅; 9.從顏色上區(qū)分:紅,藍是主動;粉,綠是主力。 10.公式中用大量l2數(shù)據(jù),沒有開通的顯示不全 指標源碼: DRAWGBK(C>0, RGB(0,0,00),RGB(0,0,0),0,'H15',0); DRAWBAND(MA(CLOSE,5),RGB(150,50,100),MA(CLOSE,10),RGB(83,123,68)); RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1),LINETHICK0; D:=SMA(K,3,1),LINETHICK0; J:=3*K-2*D,LINETHICK0; 強弱界:MA(CLOSE,20),COLORCYAN,LINETHICK4; 上升趨勢:IF(MA(CLOSE,20)>=REF(MA(CLOSE,20),1),MA(CLOSE,20),DRAWNULL),COLORMAGENTA,LINETHICK4; {下降趨勢:IF(MA(CLOSE,20)<REF(MA(CLOSE,20),1),MA(CLOSE,20),DRAWNULL),COLORCYAN,LINETHICK4;} 五日線:MA(CLOSE,5),LINETHICK3,COLORGREEN; 五日上升:IF(五日線>=REF(五日線,1),五日線,DRAWNULL),LINETHICK3,COLORRED; 十日線:MA(CLOSE,10),LINETHICK1,COLORWHITE; 生命線:MA(CLOSE,30),LINETHICK2,COLORRED; 六零線:MA(CLOSE,60),LINETHICK2,COLORWHITE; {生命線:=EMA(CLOSE,20);} STICKLINE(CLOSE>生命線 AND J>REF(J,1),OPEN,CLOSE,2,0),COLORRED; STICKLINE(CLOSE>生命線 AND C>O AND J>REF(J,1),HIGH,LOW,0.1,0),COLORRED; STICKLINE(CLOSE>生命線 AND C<O AND J>=REF(J,1),HIGH,LOW,0.05,0),COLORGREEN; STICKLINE(CLOSE>生命線 AND J<REF(J,1),OPEN,CLOSE,2,0),COLORGRAY; STICKLINE(CLOSE>生命線 AND C<O AND J<REF(J,1),HIGH,LOW,0.05,0),COLORGREEN; STICKLINE(CLOSE>生命線 AND C>O AND {(J<K OR} J<REF(J,1),HIGH,LOW,0.05,0),COLORRED; STICKLINE(CLOSE<生命線,OPEN,CLOSE,2,0),COLORGREEN; STICKLINE(CLOSE<生命線 AND C>O,HIGH,LOW,0.05,0),COLORRED; STICKLINE(CLOSE<生命線 AND C<O,HIGH,LOW,0.05,0),COLORGREEN; {DRAWTEXTREL(5,20,STKLABEL+' '+STKNAME+' '+DYNAINFO(7)+'元'+' '+DYNAINFO(14)*100+'%'),LINETHICK2,COLORFFFF00;}; HD:=FILTER(BACKSET(FILTER(REF(C,10)=HHV(C,2*10+1),10),10+1),10); LD:=FILTER(BACKSET(FILTER(REF(C,10)=LLV(C,2*10+1),10),10+1),10); 波峰:IF(BARSLAST(HD)<BARSLAST(LD) AND NOT(HD),REF(C,BARSLAST(HD)),REF(C,BARSLAST(HD))),COLORFF00FF,POINTDOT; 波谷:IF(BARSLAST(HD)>BARSLAST(LD) AND NOT(LD),REF(C,BARSLAST(LD)),REF(C,BARSLAST(LD))),COLOR80FF00,POINTDOT; 突破:=CROSS(C,波峰) AND VOL>MA(VOL,25) AND C/REF(C,1)>1.0143; DRAWTEXT(突破,L*0.93,'突破'),COLORMAGENTA; DRAWICON(突破,L*0.96,1); VAR111:=ZIG(3,10); DRAWICON((REF(VAR111,2) > REF(VAR111,1)) AND (VAR111 > REF(VAR111,1)),LOW*0.98,5); DRAWTEXT((REF(VAR111,2) > REF(VAR111,1)) AND (VAR111 > REF(VAR111,1)),LOW*0.95,'全倉'),COLORYELLOW; DRAWICON((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),HIGH*1.03,15); DRAWTEXT((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),HIGH*1.06,'清倉'),COLORYELLOW; {全倉畫紅色K線主體,清倉畫藍色K線主體。} STICKLINE((REF(VAR111,2)>REF(VAR111,1)) AND (VAR111>REF(VAR111,1)),CLOSE,OPEN,4,0),COLORYELLOW; STICKLINE((REF(VAR111,2)<REF(VAR111,1)) AND (VAR111<REF(VAR111,1)),CLOSE,OPEN,4,0),COLORBLUE; {在小于等于3個交易日,符合黃笑臉和全倉條件時,在屏幕左上角顯示紅色“進場”;符合跑人和清倉條件時,顯示黃色“離場”。線的粗細不起作用 {DRAWTEXT_FIX(CURRBARSCOUNT<=3 AND REF(VAR111,2) > REF(VAR111,1) AND VAR111 > REF(VAR111,1),0.00,0.28,0,'進場'),COLORRED;} DRAWTEXT_FIX(CURRBARSCOUNT<=3 AND REF(VAR111,2) < REF(VAR111,1) AND VAR111 < REF(VAR111,1),0.00,0.28,0,'離場'),COLORYELLOW; 股價96:='Y395'; 增幅96:=XMA(XMA(XMA(股價96,3),3),3)-REF(XMA(XMA(XMA(股價96,3),3),3),1); X396:=XMA(股價96,3); J396:=(XMA(股價96,3)*3+0.5*股價96-0.5*REF(股價96,1)+增幅96)/3; Y396:IFF(CURRBARSCOUNT=1,J396,X396),LINETHICK4,COLORGREEN; IF(Y396>REF(Y396,1),Y396,DRAWNULL),COLORRED,LINETHICK4; 高險區(qū)1:Y396*1.1,COLORLIRED,COLORFFFF00; 高風區(qū)2:Y396*1.125,COLORLIRED,COLORFF0000; 高風區(qū)3:Y396*1.15,COLORLIRED,COLOR00FF00; 良機區(qū)1:Y396*0.9,COLORLIBLUE,COLOR00FFFF; 良機區(qū)2:Y396*0.875,COLORLIBLUE,COLORFF00FF; 良機區(qū)3:Y396*0.85,COLOR0000FF; JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3)); DDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01); JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) && JJJ>(DYNAINFO(6)-0.01))); {基礎位移} CYC∞:IF(JJJT,DMA(AMOUNT/(100*VOL),100*VOL/FINANCE(7)),EMA((HIGH+LOW+CLOSE)/3,120)),COLORBLUE,LINETHICK2; {基礎位移} CYS∞:=(CLOSE-CYC∞)/CYC∞*100; 成本谷:=REF(CYC∞,BARSLAST(CYS∞<=0)-1),LINETHICK0,COLORRED;{賦值指標為最近一次剛上穿CYC∞時的CYC∞的數(shù)值} 負成本谷:=REF(CYC∞,BARSLAST(CYS∞>0)-1); 正基礎位移:=100*(CLOSE-成本谷)/成本谷; 負基礎位移:=100*(CLOSE-負成本谷)/負成本谷; 基礎位移:=IF(CYS∞>=0,正基礎位移,負基礎位移),LINETHICK0,COLORYELLOW; 牛天數(shù):=BARSLAST(CROSS(CYS∞,0))+1; 熊天數(shù):=(-1)*BARSLAST(CROSS(0,CYS∞))-1; 牛熊天數(shù):=IF(CYS∞>0,牛天數(shù),熊天數(shù)),LINETHICK0,COLORMAGENTA; DRAWTEXT_FIX(1,0.004,0.360,0,STRCAT('成本谷:',CON2STR(成本谷,2))),COLORWHITE; DRAWTEXT_FIX(1,0.091,0.360,0,STRCAT('基礎位移:',CON2STR(基礎位移,2))),COLORWHITE; DRAWTEXT_FIX(1,0.180,0.360,0,STRCAT('牛熊天數(shù):',CON2STR(牛熊天數(shù),0))),COLORWHITE; {以下LCY有較大修改} 超B:=L2_AMO(0,2)/10000.0; 大B:=L2_AMO(1,2)/10000.0; 中B:=L2_AMO(2,2)/10000.0; 小B:=L2_AMO(3,2)/10000.0; 超S:=-L2_AMO(0,3)/10000.0; 大S:=-L2_AMO(1,3)/10000.0; 中S:=-L2_AMO(2,3)/10000.0; 小S:=-L2_AMO(3,3)/10000.0; 凈流入:=(超B+大B+中B+小B)+(超S+大S+中S+小S); 中單:=中B+中S; 大宗凈流入:=(超B+大B)+(超S+大S); 三日大宗:=SUM(大宗凈流入,3); 十日大宗:=SUM(大宗凈流入,10); 超大單:=(超B)+(超S); 大單:=(大B)+(大S); 小單:=(小B)+(小S); 大宗進:=(超B)+(大B); 大宗出:=(超S)+(大S); 非大宗進:=(中B)+(小B); 非大宗出:=(中S)+(小S); 近3日流向:=SUM(凈流入,3); 近10日流向:=SUM(凈流入,10); 主力買力度:=LARGEINTRDVOL*100/VOL; 主力賣力度:=LARGEOUTTRDVOL*100/VOL; DRAWRECTREL(0,410,264,999.4,IF(120,RGB(10,0,0),0)); AAB:=CONST(MAX(ABS(超大單),MAX(ABS(大單),MAX(ABS(中單),ABS(小單)))))*1.5,NODRAW; DRAWRECTREL(2,CONST(945-(ABS(超大單)*400/AAB)),37,945,IF(CONST(超大單)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(39,CONST(945-(ABS(大單)*400/AAB)),74,945,IF(CONST(大單)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(76,CONST(945-(ABS(中單)*400/AAB)),111,945,IF(CONST(中單)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(113,CONST(945-(ABS(小單)*400/AAB)),148,945,IF(CONST(小單)>0,RGB(255,0,0),RGB(23,125,255))); DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.002,0.9,0,INTPART(超大單)),COLORWHITE; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.038,0.85,0,INTPART(大單)),COLORWHITE; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.076,0.9,0,INTPART(中單)),COLORWHITE; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.115,0.85,0,INTPART(小單)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.004,1,0,'超大單'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.044,1,0,'大單'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.082,1,0,'中單'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.1160,1,0,'小單'),COLORYELLOW; AAC:=CONST(MAX(ABS(凈流入),MAX(ABS(近3日流向),ABS(近10日流向))))*1.5,NODRAW; DRAWRECTREL(153,CONST(945-(ABS(凈流入)*400/AAC)),188,945,IF(CONST(凈流入)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(190,CONST(945-(ABS(近3日流向)*400/AAC)),225,945,IF(CONST(近3日流向)>0,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(227,CONST(945-(ABS(近10日流向)*400/AAC)),262,945,IF(CONST(近10日流向)>0,RGB(255,0,0),RGB(23,125,255))); DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.152,0.9,0,INTPART(凈流入)),COLORWHITE; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.190,0.85,0,INTPART(近3日流向)),COLORWHITE; DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.228,0.9,0,INTPART(近10日流向)),COLORWHITE; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.152,1,0,'凈流入'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.190,1,0,'三日流'),COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=1,0.228,1,0,'十日流'),COLORYELLOW; DDX:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*100/CAPITAL; DDY:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0); DDZ:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0); DRAWRECTREL(2,415,88,465,IF(CONST(DDX)>0,RGB(175,50,250),RGB(0,100,0))); DRAWRECTREL(89,415,175,465,IF(CONST(DDY)>0,RGB(175,50,250),RGB(0,100,0))); DRAWRECTREL(176,415,262,465,IF(CONST(DDZ)>0,RGB(175,50,250),RGB(0,100,0))); DRAWTEXT_FIX(1,0.004,0.420,0,STRCAT('大單動向:',CON2STR(DDX,2))),COLORWHITE; DRAWTEXT_FIX(1,0.091,0.420,0,STRCAT('漲跌動因:',CON2STR(DDY,2))),COLORWHITE; DRAWTEXT_FIX(1,0.178,0.420,0,STRCAT('大單差分:',CON2STR(DDZ,2))),COLORWHITE; DDX連紅:=BARSLASTCOUNT(DDX>0); DDY連紅:=BARSLASTCOUNT(DDY>0); DDZ連紅:=BARSLASTCOUNT(DDZ>0); DRAWTEXT_FIX(1,0.004,0.470,0,STRCAT(STRCAT('連紅 ',CON2STR(DDX連紅,0)),' [天] ')),COLORWHITE; DRAWTEXT_FIX(1,0.091,0.470,0,STRCAT(STRCAT('連紅 ',CON2STR(DDY連紅,0)),' [天] ')),COLORWHITE; DRAWTEXT_FIX(1,0.178,0.470,0,STRCAT(STRCAT('連紅 ',CON2STR(DDZ連紅,0)),' [天] ')),COLORWHITE; WWW70822COM:DRAWNULL,COLORRED; DDX十紅:=COUNT(DDX>0,10); DDY十紅:=COUNT(DDY>0,10); DDZ十紅:=COUNT(DDZ>0,10); DRAWTEXT_FIX(1,0.004,0.520,0,STRCAT(STRCAT('十紅 ',CON2STR(DDX十紅,0)),' [天] ')),COLORWHITE; DRAWTEXT_FIX(1,0.091,0.520,0,STRCAT(STRCAT('十紅 ',CON2STR(DDY十紅,0)),' [天] ')),COLORWHITE; DRAWTEXT_FIX(1,0.178,0.520,0,STRCAT(STRCAT('十紅 ',CON2STR(DDZ十紅,0)),' [天] ')),COLORWHITE; 主買量占比:=LARGEINTRDVOL/(LARGEINTRDVOL+LARGEOUTTRDVOL)*100; {主力凈買量:=(LARGEINTRDVOL-LARGEOUTTRDVOL);} TMP:=LARGEINTRDVOL-LARGEOUTTRDVOL; 主力活躍度:=(LARGEINTRDVOL+LARGEOUTTRDVOL)*100/FINANCE(7)*100; {主力活躍度:=(LARGEINTRDVOL+LARGEOUTTRDVOL)*10000/(2*FINANCE(7));} 主力凈資:=(L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1))/10000.0; DRAWRECTREL(2,570,88,616,IF(CONST(主買量占比)>50,RGB(175,50,250),RGB(0,100,0))); DRAWRECTREL(89,570,175,616,IF(CONST(TMP)>0,RGB(175,50,250),RGB(0,100,0))); DRAWRECTREL(176,570,262,616,IF(CONST(主力凈資)>0,RGB(175,50,250),RGB(0,100,0))); DRAWTEXT_FIX(1,0.004,0.575,0,STRCAT('主力買比:',CON2STR(主買量占比,2))),COLORWHITE; DRAWTEXT_FIX(1,0.091,0.575,0,STRCAT('主力活躍度:',CON2STR(主力活躍度,2))),COLORWHITE; DRAWTEXT_FIX(1,0.178,0.575,0,STRCAT('主力凈資:',CON2STR(主力凈資,0))),COLORWHITE; 主力主動買占比:=(超B+大B)/(超B+大B-超S-大S)*100; {主動買占比:=ACTINVOL/(ACTINVOL+ACTOUTVOL)*100;} {連續(xù)飄紅:=BARSLASTCOUNT(大宗凈流入>0);} 十日飄紅:=COUNT(大宗凈流入>0,10); DRAWRECTREL(2,616,88,665,IF(CONST(主力主動買占比)>50,RGB(255,0,0),RGB(23,125,255))); DRAWRECTREL(89,616,175,665,IF(CONST(十日飄紅)>0,RGB(255,0,0),RGB(25,125,255))); DRAWTEXT_FIX(1,0.004,0.620,0,STRCAT('主主買比:',CON2STR(主力主動買占比,2))),COLORYELLOW; DRAWTEXT_FIX(1,0.091,0.620,0,STRCAT('主力主動十紅:',CON2STR(十日飄紅,0))),COLORYELLOW; |
|