主圖公式源碼 XG:HHV(H,480),DOTLINE,COLORCYAN; RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1; JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1; 均線1:=REF(C,JY); 均線2:=REF(均線1,JY); 均線3:=REF(均線2,JY); 均線4:=REF(均線3,JY); 均線5:=REF(均線4,JY); 均線6:=REF(均線5,JY); 均線7:=REF(均線6,JY); 均線8:=REF(均線7,JY); 均線9:=REF(均線8,JY); GG1:=MAX(DYNAINFO(3),DYNAINFO(5)); HH1:=MIN(DYNAINFO(3),DYNAINFO(6)); P1:=GG1-HH1; 阻力:HH1+P1*8/9,COLORLIRED,DOTLINE; 支撐:HH1+P1*0.5/9,COLORGREEN,DOTLINE; 均線:IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW,DOTLINE; DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))+DYNAINFO(3); DEA:=EMA(DIF,9); MACD1:=10*(DIF-DEA); MACD2:=EMA(MACD1,2); 大大大:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(V*100,BARSCOUNT(CLOSE)); 主力:=EXPMA(CLOSE/大大大,20); 大戶:=EXPMA(CLOSE/大大大,60); 散戶:=EXPMA(CLOSE/大大大,120); 底:=1; 1.022,NODRAW; 高:=1.033; DRAWTEXT(CROSS(主力,1.02),C*0.999,' 拉'),COLORMAGENTA; DRAWICON(CROSS(主力,1.04),C,45); DRAWTEXT(CROSS(主力,1.04),C*0.999,' 沖'),COLORRED; A1:=(VOL/CLOSE)/3; A2:=SUM((IF(((A1>40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0); A3:=SUM((IF(((A1>40) AND (CLOSE< (REF(CLOSE,1)))),A1,0)),0); A4:=SUM((IF(((A1< 40) AND (CLOSE>(REF(CLOSE,1)))),A1,0)),0); A5:=SUM((IF(((A1< 40) AND (CLOSE< (REF(CLOSE,1)))),A1,0)),0); A6:=((A2+A3)+A4)+A5; A7:=IF((BARSTATUS=2),((100*A2)/A6),0); A8:=((IF((BARSTATUS=2),((100*A3)/A6),0))); A9:=((IF((BARSTATUS=2),((100*A4)/A6),0))); A10:=((IF((BARSTATUS=2),((100*A5)/A6),0))); DRAWTEXT(LONGCROSS(支撐,C,2),C-0.01,' 買入'),COLOR0000FF; DRAWICON(LONGCROSS(支撐,C,2),C-0.01,1); STICKLINE(LONGCROSS(支撐,C,2),C,阻力,0,-1),COLORCYAN; DRAWTEXT(LONGCROSS(C,阻力,2),C+0.01,' 賣出'),COLORGREEN; DRAWICON(LONGCROSS(C,阻力,2),C+0.01,45); STICKLINE(LONGCROSS(C,阻力,2),C,支撐,0,-1),COLORRED; 量?jī)r(jià):=(VOL/CLOSE)/3; B2:=SUM((IF(((量?jī)r(jià)>0.20) AND (CLOSE>(REF(CLOSE,1)))),量?jī)r(jià),0)),0); B3:=SUM((IF(((量?jī)r(jià)>0.20) AND (CLOSE< (REF(CLOSE,1)))),量?jī)r(jià),0)),0); B6:=B2+B3; DD1:=1; 比:=B2/B3; D1:=YEAR AND MONTH AND DAY; BA1:=STRCAT(CON2STR(YEAR,0),'年'); BA2:=STRCAT(CON2STR(MONTH,0),'月'); BA3:=STRCAT(CON2STR(DAY,0),'日'); BA4:=STRCAT('星期',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日'))))))); AA:=STRCAT(STRCAT(STRCAT(BA1,BA2),STRCAT(BA3,BA4)),''); DRAWTEXT_FIX(D1,0.905,0,0,AA),COLORGRAY; TD1:=V*C/100; TD2:=SUM((IF(((TD1/8>20) AND (CLOSE>(REF(CLOSE,1)))),TD1,0)),0); TD3:=SUM((IF(((TD1/8>20) AND (CLOSE< (REF(CLOSE,1)))),TD1,0)),0); TD4:=SUM((IF(((TD1/8< 20) AND (CLOSE>(REF(CLOSE,1)))),TD1,0)),0); TD5:=SUM((IF(((TD1/8< 20) AND (CLOSE< (REF(CLOSE,1)))),TD1,0)),0); WA6:=((A2+A3)+A4)+A5; WA7:=IF((ISLASTBAR),((100*TD2)/WA6),0); WA8:=IF((ISLASTBAR),((100*TD3)/WA6),0); WA9:=IF((ISLASTBAR),((100*TD4)/WA6),0); TD10:=IF((ISLASTBAR),((100*TD5)/WA6),0); 機(jī)構(gòu)買盤:=(TD2); 機(jī)構(gòu)賣盤:=(TD3); 散戶買盤:=(TD4); 散戶賣盤:=(TD5); DRAWTEXT_FIX(1,0.752,1-0.088,0,STRCAT(STRCAT('【機(jī)構(gòu)買盤】',CON2STR(機(jī)構(gòu)買盤,2)),' 萬(wàn)')),COLORRED; DRAWTEXT_FIX(1,0.752,1-0.001,0,STRCAT(STRCAT('【機(jī)構(gòu)賣盤】',CON2STR(機(jī)構(gòu)賣盤,2)),' 萬(wàn)')),COLORGREEN; DRAWTEXT_FIX(1,0.883,1-0.088,0,STRCAT(STRCAT('【散戶買盤】',CON2STR(散戶買盤,2)),' 萬(wàn)')),COLORMAGENTA; DRAWTEXT_FIX(1,0.883,1-0.001,0,STRCAT(STRCAT('【散戶賣盤】',CON2STR(散戶賣盤,2)),' 萬(wàn)')),COLORCYAN; DRAWTEXT_FIX(1,0.0,0.8,0,'公'),COLORRED,LINETHICK1; DRAWTEXT_FIX(1,0.0,0.8,0,' 眾'),COLORRED,LINETHICK1; DRAWTEXT_FIX(1,0.0,0.8,0,' 號(hào):通達(dá)指標(biāo)'),COLORRED,LINETHICK1; |
|
來(lái)自: 指標(biāo)公社 > 《TDX指標(biāo)主圖》