我很佩服唐仁政老師的這個副圖指標,很感謝他老人家無私的奉獻,在此我講他的源碼發(fā)布出來 希望大家一起來學習。 這個指標只有放在分時圖里才能更好的運用。 具體分時圖改指標的方法 我提供一個 , 不過有點笨拙 , 就是在TOO02 文件下的 USRE 用戶TXT 文件里 修改一個ZSTZB 后的指標名稱修改自己想要的指標名稱即可
{【盤龍駙鳳】} 昨收:=DYNAINFO(3); HH:=DYNAINFO(5); LL:=DYNAINFO(6); FK:=MAX(HH-昨收,昨收-LL)*0.1; ZS:=昨收-FK*3.2; Q1:=昨收-FK*3.22; Q2:=昨收-1*FK*3.22; Q3:=昨收-5*FK*3.2; {時間大額設置} TJ:=FILTER(C,239)>0,NODRAW; TJJ:=SUM(TJ,0),NODRAW; TJA:=CONST(TJJ),NODRAW; C1:=CLOSE; V1:=TIME; A1:=COUNT(BARSCOUNT(C)=1 AND TIME<102000 ,0 ); T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)), (FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000))),NODRAW; TTA:=90; KP30:=T<240; KPGD:=H=HHV(H,0) AND KP30; GDSJ:=BARSLAST(KPGD); RCC:=DYNAINFO(3); S2:=SMA(C,3,1); S6:=SMA(C,5,1); DK:=4*(S2-S6); KK:=1; 成交額:=AMOUNT,NODRAW; VV2:=SUM(AMOUNT,T),NODRAW; VV3:=VV2/T; SS:=IF(CAPITAL>150000000,0.3,IF(CAPITAL>20000000,0.5,IF(CAPITAL>10000000,0.8,IF(CAPITAL<200000,5,IF(CAPITAL<1000000,3, IF(CAPITAL<5000000,1.5,1)))))),NODRAW; VV5:=(REF(VV3,T-1)/CEILING(REF(VV3,T-1)/CAPITAL *10000+0.1))*SS,NODRAW; 大額線:=IF(REF(VV3,T)=REF(VV3,T-1),VV5,REF(VV3,T)),NODRAW; 起算量:大額線*100,COLOR00FFFF,NODRAW; 初正1:=IF(T=1 AND DYNAINFO(4)>=DYNAINFO(3),VV2,0); 初負1:=IF(T=1 AND DYNAINFO(4)<DYNAINFO(3),VV2,0); 初正:=CONST(SUM(IF(初正1>=大額線 AND T=1,初正1,0),T)),NODRAW; 初負:=CONST(SUM(IF(初負1>=大額線 AND T=1,初負1,0),T)),NODRAW; 初正2:=CONST(SUM(IF(初正1<大額線 AND T=1,初正1,0),T)),NODRAW; 初負2:=CONST(SUM(IF(初負1<大額線 AND T=1,初負1,0),T)),NODRAW; T00:=IF(C1>REF(C1,1),0.9,-0.9); T01:=IF(C1<REF(C1,1),-0.9,0.9); T02:=T00+T01,NODRAW; TT1:=BARSLAST(CROSS(T02,+1.5)),NODRAW; TT2:=BARSLAST(CROSS(-1.5,T02)),NODRAW; TT:=IF(T02=1.8,1,IF(T02=-1.8,-1,0)); 正V1:=IF(TT=1 OR (TT=0 AND TT1<TT2),成交額,0),NODRAW; 負V1:=IF(TT=-1 OR (TT=0 AND TT1>TT2),成交額,0),NODRAW; 正總1:=初正1+SUM(正V1,T),NODRAW,COLOR0000FF; 負總1:=初負1+SUM(負V1,T),NODRAW,COLOR00FF00; 正V:=IF(正V1>=大額線,正V1,0); 負V:=IF(負V1>=大額線,負V1,0); 正V2:=IF(正V1<大額線,正V1,0); 負V2:=IF(負V1<大額線,負V1,0); 正總:=初正+SUM(正V,T),NODRAW,COLOR0000FF; 負總:=初負+SUM(負V,T),NODRAW,COLOR00FF00; 正總2:=初正2+SUM(正V2,T),NODRAW,COLOR0000FF; 負總2:=初負2+SUM(負V2,T),NODRAW,COLOR00FF00; 大差%:(正總-負總)/(正總+負總)*100,COLOR00FF00,NODRAW; 小差%:(正總2-負總2)/(正總2+負總2)*100,COLOR00FF00,NODRAW; JSQ:=IF((Q2+Q3)/2*1.042<RCC,RCC,(Q2+Q3)/2*1.042); DRAWBAND(JSQ,RGB(50,50,50),(Q2+Q3)/2*0.99,DRAWNULL); Q4:=IF(大差%>=0,JSQ,(Q2+Q3)/2*0.99),NODRAW; Q5:=IF(大差%>=0,(Q2+Q3)/2*0.99,JSQ),NODRAW; DRAWBAND(Q4,RGB(100,100,100),Q5,RGB(50,50,50)); STICKLINE(CROSS(大差%,-0.999),(Q2+Q3)/2*0.99,JSQ,10,0),COLOR777777; STICKLINE(CROSS(-0.999,大差%),(Q2+Q3)/2*0.99,JSQ,10,0),COLOR777777; {強弱界定} MMA30:=EMA(CLOSE,30)-(Q2+Q3)/2*0.01; 強弱界定:=EMA(CLOSE,900)-(Q2+Q3)/2*0.01; DRAWBAND(MMA30,RGB(200,100,0),強弱界定,RGB(0,150,150)); DRAWICON(CROSS(MMA30,強弱界定),H,1); {金龍喜舞} 日時轉(zhuǎn)換:=IF(PERIOD=5,120,240); QZS:=(EMA(CLOSE,10)+EMA(CLOSE,32))/2-(Q2+Q3)/2*0.01; VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2-(Q2+Q3)/2*0.01; VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2-(Q2+Q3)/2*0.01; VAR3:=(VAR1+VAR2)/2; VAR4:=EMA(VAR3,30); VAR5:=EMA(VAR3,60); VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5); DRAWBAND(VAR1,RGB(150,30,30),EMA(VAR1,60),RGB(0,110,30)); 牽引線:=VAR1,COLORYELLOW; 強弱線:=EMA(VAR1,日時轉(zhuǎn)換),POINTDOT,COLORWHITE; 趨勢關注:=IF(CROSS(VAR1,EMA(VAR1,60)) AND VAR6,1,0),NODRAW,COLORRED; 量價關注:=IF(CROSS(VAR3,VAR5) AND VAR6,1,0),NODRAW,COLORWHITE; 沖擊量:=IF(VAR3>VAR5 AND VAR6,1,0),NODRAW,COLORYELLOW; 強勢區(qū):=IF(VAR1>強弱線,1,DRAWNULL),NODRAW,COLORRED; 止損區(qū):=IF(VAR1<強弱線,1,DRAWNULL),NODRAW,COLORGREEN; STICKLINE(QZS>VAR1,QZS,VAR1,1,0),COLORFF00FF; STICKLINE(沖擊量=1,QZS,VAR1,1,0),COLORYELLOW; DRAWICON(趨勢關注=1,EMA(VAR1,60),13); DRAWTEXT(量價關注=1,EMA(VAR1,60),'L0V'),COLORWHITE; {分時MACD} DIF:=(EMA(CLOSE,13) - EMA(CLOSE,24)); DEA:=(EMA(DIF,6)); MACD:=5*(DIF-DEA); STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED; STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLORCYAN; STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED; {多頭MACD} DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100; DEAA:=EMA(DIFF,18); 多頭MACD:=(-3*(DIFF-DEAA))*20,NODRAW; ZD:=HHV(多頭MACD,0); ZX:=LLV(多頭MACD,0); CZ:=(Q2-Q3)/6; FDM:=MAX(ABS(ZD),ABS(ZX))*1.5; RB:=(Q2+Q3)/2*0.99+2*(Q2-Q3)/4/FDM*多頭MACD; STICKLINE(多頭MACD>0,RB,(Q2+Q3)/2*0.99,2,1),LINETHICK1,COLOR00AAFF; STICKLINE(多頭MACD<0,RB,(Q2+Q3)/2*0.99,2,1),LINETHICK1,COLOR00AA00; {火焰山} EEEE:=(RCC-ZS)/3; FVAR1:=REF(LOW,1); FVAR2:=SMA(ABS(LOW-FVAR1),13,1)/SMA(MAX(LOW-FVAR1,0),13,1); FVAR3:=EMA(FVAR2,13); FVAR4:=LLV(LOW,34); FVAR51:=EMA(IF(LOW<=FVAR4,FVAR3,0),3); FVAR5:=IF(FVAR51>20,20,FVAR51); 主力進場:STICKLINE(FVAR5>REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,10,0 ),COLORRED; STICKLINE(FVAR5<REF(FVAR5,1),(Q2+Q3)/2,(Q2+Q3)/2+FVAR5*EEEE,5,1),COLORGREEN; {莊跡} FVAR6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE- LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1); FVAR8:=TJA<4 AND COUNT(((FVAR6<REF(FVAR6,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1) AND CLOSE<DYNAINFO(3)*1.02)),30)=1; DRAWTEXT(FVAR8 AND COUNT(FVAR8,30)=1,(Q2+Q3)/2*0.99,'★跡'),COLORFFFFFF; {橫盤突破} YY:=SMA(VOL,30,1); 量1:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30)); 量:=(YY-LLV(LLV(YY,1),30))/(HHV(HHV(YY,1),30)-LLV(LLV(YY,1),30))>0.92; 短橫:=((HHV(CLOSE,TTA)-LLV(CLOSE,TTA))/CLOSE)<0.01; 橫后上漲:=(CLOSE/DYNAINFO(3))<1.03 AND 短橫 AND 量 AND CROSS(C,(MA(C*V,TTA)/MA(V,TTA) + AVEDEV(C,TTA)*2)); 上漲:=T>90 AND (FILTER((CROSS(橫后上漲,0) AND 量 AND T>60 OR (T>60 AND CLOSE<DYNAINFO(3)*1.03 AND (量1<0.5 OR 量1=1) AND BARSLAST(CROSS(C,(MA(C*V,TTA)/MA(V,TTA) + AVEDEV(C,TTA)*2)))<3 AND CROSS(C,MA(HHV(C,TTA),1)))),30)); STICKLINE(TJA<4 AND 上漲,(Q2+Q3)/2,(Q2+Q3)/2*1.035,10,0),COLOR0000FF; DRAWTEXT(TJA<4 AND 上漲,(Q2+Q3)/2*1.035,'★橫'),COLORRED; {DIF金叉以及KD金叉} JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(TJA<4 AND 二次金叉,(Q2+Q3)/2,(Q2+Q3)/2*1.01,10,0),COLORFF00FF; DRAWTEXT(TJA<4 AND 二次金叉,(Q2+Q3)/2*1.01,' 二金'),COLORYELLOW; HHH:=MA(CLOSE,10); GGG:=MA(CLOSE,12); 下:=EMA((MA(LOW,3) * 0.96),30); 決戰(zhàn):STICKLINE((TJA<4 OR TJA=3 AND TJJ>1) AND (CROSS(DIF,DEA) AND (下 - REF(下,1)) > 0 AND MACD > REF(MACD,1) AND DIF < 0),(Q2+Q3)/2,(Q2+Q3)/2*1.01,10,0),COLOR0000FF; DRAWTEXT((TJA<4 OR TJA=3 AND TJJ>1) AND (CROSS(DIF,DEA) AND (下 - REF(下,1)) > 0 AND MACD > REF(MACD,1) AND DIF < 0),(Q2+Q3)/2*1.03,'DIF金叉'),COLORFFFFFF; RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100); K:=SMA(SMA(RSV,18,1),3,1); D:=MA(EMA(K,18),3); 短買:=(CROSS(K,D) AND K>0 AND 量 AND CLOSE<DYNAINFO(3)*1.03); JCC:=COUNT(CROSS(K,D),BARSLAST(D>=0)); K二金:=(CROSS(K,D) AND DEA<0 AND COUNT(JCC=2,21)=1); DRAWTEXT(TJA<4 AND 短買,(Q2+Q3)/2*1.035,'短買'),COLORFFFF00; DRAWTEXT(TJA<4 AND K二金,(Q2+Q3)/2*1.035,'K二金'),COLORFFEE00; {沖高過頂} 頂高:REF(H,GDSJ),COLORFFFFFF,POINTDOT,LINETHICK1; 過頂:=IF(CROSS(C,頂高),1,0),COLOR00FF00,POINTDOT,NODRAW; 沖高:=IF(FILTER(CROSS(C,頂高*1.01),15),1,0),COLOR00FFFF,POINTDOT,NODRAW; DRAWTEXT(過頂,頂高*1.005,'↑'),COLOR00FF00; DRAWTEXT(沖高,頂高*1.005,'☆'),COLOR00FFFF; {盤龍駙鳳} RCC11:=IF((RCC*KK+大差%/100)<(Q2+Q3)/2*0.96,(Q2+Q3)/2*0.96-((Q2+Q3)/2*0.96-(RCC*KK+大差%/100))*0.1, IF((RCC*KK+大差%/100)>(Q2+Q3)/2*1.07 AND (Q2+Q3)/2*1.04>=RCC*KK , (Q2+Q3)/2*1.07+((RCC*KK+大差%/100)-(Q2+Q3)/2*1.04)*0.1,(RCC*KK+大差%/100))),NODRAW; RCC1:=IF(RCC*KK>(Q2+Q3)/2*1.04 AND RCC11>RCC*KK, (RCC11-RCC*KK)*0.2+RCC*KK,RCC11); 盤龍:IF(T>5 AND 正總!=0 AND 負總!=0,RCC1,DRAWNULL),COLOR00FF00,LINETHICK2; RCC22:=IF((RCC*KK+小差%/100)<(Q2+Q3)/2,(Q2+Q3)/2-((Q2+Q3)/2-(RCC*KK+小差%/100))*0.1, IF((RCC*KK+小差%/100)>(Q2+Q3)/2*1.04 AND (Q2+Q3)/2*1.04>=RCC*KK , (Q2+Q3)/2*1.04+((RCC*KK+小差%/100)-(Q2+Q3)/2*1.04)*0.1,(RCC*KK+小差%/100))); RCC2:=IF(RCC*KK>(Q2+Q3)/2*1.04 AND RCC22>RCC*KK, (RCC22-RCC*KK)*0.2+RCC*KK,RCC22); 望喜:IF(T>5 AND 正總1!=0 AND 負總1!=0,RCC2,DRAWNULL),COLORFFFF00,LINETHICK1; STICKLINE(FILTER(C,239)>0,(Q2+Q3)/2*0.99,JSQ,0.5,0),COLORWHITE; EMA(VAR1,日時轉(zhuǎn)換),POINTDOT,COLORWHITE; |
|