本帖最后由 123456 于 2013-3-3 21:16 編輯 ZSR:=DYNAINFO( 3);{前收盤價 即時行情數(shù)據(jù)} GDK:=(SMA(C,2,1)-SMA(C,6,1))*2.1; HH:DYNAINFO(5);{最高} LL:DYNAINFO(6);{最低} 中G:(HH+LL)/2,POINTDOT;{中} {四線} AAA:=DYNAINFO(5); BBB:=DYNAINFO(6); CCC:=AAA-BBB; 上頂:=BBB+CCC*7/8,POINTDOT; 阻力:=BBB+CCC*2/3,POINTDOT; 支撐:=BBB+CCC/3,POINTDOT; 下底:=BBB+CCC*1/8,POINTDOT; JJ:SUM(C*V,0)/SUM(V,0); 上漲家數(shù):=CONST(IF(PERIOD=0 ,"FSKY2.上漲家數(shù)#DAY",DRAWNULL)),NODRAW; 下跌家數(shù):=CONST(IF(PERIOD=0 ,"FSKY2.下跌家數(shù)#DAY",DRAWNULL)),NODRAW; 漲跌比:=上漲家數(shù)/(上漲家數(shù)+下跌家數(shù))*100; 一純%:=CONST(IF(PERIOD=0 ,"FSKY2.一純%#DAY",DRAWNULL)),NODRAW; 三純%:=CONST(IF(PERIOD=0 ,"FSKY2.三純%#DAY",DRAWNULL)),NODRAW; 五純%:=CONST(IF(PERIOD=0 ,"FSKY2.五純%#DAY",DRAWNULL)),NODRAW; DRAWTEXT_FIX(1,0.020,1-0.05,0,STRCAT('上漲家數(shù):',CON2STR(上漲家數(shù),0))),COLORRED; DRAWTEXT_FIX(1,0.170,1-0.05,0,STRCAT('下跌家數(shù):',CON2STR(下跌家數(shù),0))),COLORCYAN; DRAWTEXT_FIX(1,0.320,1-0.05,0,STRCAT('漲跌比:',CON2STR(漲跌比,3))),COLORYELLOW; 分時均價線:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1; K:=IF((分時均價線-DYNAINFO(3))/DYNAINFO(3)*100>0.5,0.5,0); DRAWTEXT_FIX(五純%>=0,0.82,1-0.05,0,STRCAT('五日純量%: ',CON2STR(五純%,2))),COLOR0000FF; DRAWTEXT_FIX(五純%<0,0.82,1-0.05,0,STRCAT('五日純量%: ',CON2STR(五純%,2))),COLORFFFF00; DRAWTEXT_FIX(三純%>=0,0.65,1-0.05,0,STRCAT('三日純量%: ',CON2STR(三純%,2))),COLOR0000FF; DRAWTEXT_FIX(三純%<0,0.65,1-0.05,0,STRCAT('三日純量%: ',CON2STR(三純%,2))),COLORFFFF00; DRAWTEXT_FIX(一純%>=0,0.46,1-0.05,0,STRCAT('當日純量%: ',CON2STR(一純%,2))),COLOR0000FF; DRAWTEXT_FIX(一純%<0,0.46,1-0.05,0,STRCAT('當日純量%: ',CON2STR(一純%,2))),COLORFFFF00; A:=WEEKDAY-REF(WEEKDAY,1); B:=DATETODAY(DATE)-REF(DATETODAY(DATE),1); 周天數(shù):=1+BARSLAST(BARSCOUNT(C)=0 OR A!=B),NODRAW; H1:=MAX(DYNAINFO(3),DYNAINFO(5)); L1:=MIN(DYNAINFO(3),DYNAINFO(6)); P1:=H1-L1; V1:=L1+P1*0.875; V2:=L1+P1*0.0625; DRAWTEXT(LONGCROSS(C,V1,2),H,'■賣'),COLORRED;{拋}; DRAWTEXT(LONGCROSS(V2,C,2),L,'●買'),COLORGREEN;{吸}; 買:L1+P1*0.015,NODRAW; 賣:L1+P1*0.95,NODRAW; DRAWTEXT_FIX(1,0.025,1-0.1,0,STRCAT('買:',CON2STR(買,2))),COLORRED; DRAWTEXT_FIX(1,0.1750,1-0.1,0,STRCAT('賣:',CON2STR(賣,2))),COLORGREEN; 引用公式: FSKY2 {FSKY2} 比:=240/FROMOPEN; TT:=IF(ISLASTBAR,240/FROMOPEN,1); WJ:=(H+L+C)/3; V1:=IF(H=L,1,H-MAX(O,C)); V2:=IF(H=L,1,MAX(C,O)-WJ); V3:=IF(H=L,1,MIN(O,C)-L); V4:=IF(H=L,1,WJ-MIN(C,O)); V5:=VOL/IF(H=L,4,H-L); V6:=(V1*V5); V7:=(V2*V5); V8:=(V3*V5); V9:=(V4*V5); 買盤1:=DYNAINFO(23)*比; 賣盤1:=DYNAINFO(22)*比; 買盤2:=IF(ISLASTBAR AND C>300,(V9+V8)*TT,(V9+V8)); 賣盤2:=IF(ISLASTBAR AND C>300,(V6+V7)*TT,(V6+V7)); 買盤:=IF(ISLASTBAR AND PERIOD=5 AND C<300,買盤1,買盤2); 賣盤:=IF(ISLASTBAR AND PERIOD=5 AND C<300,賣盤1,賣盤2); 今量:=買盤+賣盤; 差:=買盤-賣盤; 主買:=買盤; 昨量:=REF(VOL,1); 昨主:=REF(主買,1); 昨差:=REF(差,1); 前量:=REF(VOL,2); 前主:=REF(主買,2); 前差:=REF(差,2); 前4:=REF(VOL,3); 主4:=REF(主買,3); 差4:=REF(差,3); 前5:=REF(VOL,4); 主5:=REF(主買,4); 差5:=REF(差,4); 總5:=今量+昨量+前量+前4+前5; 總差:=差+昨差+前差+差4+差5; 一純%:差/今量*100; 三純%:(差+昨差+前差)/(今量+昨量+前量)*100; 五純%:總差/總5*100; 上漲家數(shù):INDEXADV; 下跌家數(shù):INDEXDEC; |
|