源碼編程思路破譯輸出DIFF:收盤價的12日指數(shù)移動平均-收盤價的26日指數(shù)移動平均,線寬為2 輸出DEA:DIFF的9日指數(shù)移動平均,線寬為2 輸出平滑異同平均線:2*(DIFF-DEA), COLORSTICK,線寬為2 低位金叉賦值:DIFF上穿DEA AND DIFF<-0.1 當滿足條件低位金叉時,在0和0.08位置之間畫柱狀線,寬度為6,0不為0則畫空心柱.,畫黃色 當滿足條件低位金叉時,在0.16位置書寫文字,畫白色 JCCOUNT賦值:統(tǒng)計上次DEA>=0距今天數(shù)日中滿足DIFF上穿DEA的天數(shù) 二次金叉賦值:DIFF上穿DEA AND DEA<0 AND 統(tǒng)計21日中滿足JCCOUNT=2的天數(shù)=1 當滿足條件二次金叉時,在0和0.06位置之間畫柱狀線,寬度為6,0不為0則畫空心柱.,COLORFF00FF 當滿足條件二次金叉時,在DEA*0.9位置畫1號圖標 當滿足條件二次金叉時,在0.2位置書寫文字,畫黃色 A1賦值:上次1日前的DIFF上穿DEA距今天數(shù) 底背離賦值:A1+1日前的收盤價>收盤價 AND DIFF>A1+1日前的DIFF AND DIFF上穿DEA 當滿足條件底背離時,在0和0.03位置之間畫柱狀線,寬度為6,0不為0則畫空心柱.,COLOR00FF00 輸出底背:當滿足條件A1=0時,在DEA位置畫直線起點,當滿足條件底背離時,在DEA位置畫直線終點,0表示是否延長.,畫紅色,線寬為4 當滿足條件底背離時,在0.12位置書寫文字,COLORFF00FF A2賦值:上次1日前的DEA上穿DIFF距今天數(shù) 頂背離賦值:A2+1日前的收盤價<收盤價 AND A2+1日前的DIFF>DIFF AND DEA上穿DIFF 輸出頂背:當滿足條件A2=0時,在DEA位置畫直線起點,當滿足條件頂背離時,在DEA位置畫直線終點,0表示是否延長.,畫綠色,線寬為4 當滿足條件低位金叉AND二次金叉AND底背離時,在0.25位置書寫文字,COLOR0000FF,線寬為2 輸出WWFF : 收盤價的6日指數(shù)移動平均 - 收盤價的13日指數(shù)移動平均 輸出WEA : WWFF的5日指數(shù)移動平均,COLORFF0000 輸出WFF : 收盤價的6日指數(shù)移動平均 - 收盤價的13日指數(shù)移動平均,畫紅色 輸出追漲1:0.1 0 輸出追漲2:0.2,線寬為2 輸出陽線突破:(1日前的收盤價<1日前的開盤價 AND 1日前的收盤價>開盤價 AND 收盤價>1日前的開盤價 AND 收盤價/開盤價>1.02)*0.3,線寬為2 RSV莊賦值:(((收盤價 - 9日內最低價的最低值) / (9日內最高價的最高值 - 9日內最低價的最低值)) * 100) K莊賦值:RSV莊的3日[1日權重]移動平均 D莊賦值:K莊的3日[1日權重]移動平均 J莊賦值:3*K莊-2*D莊 X莊賦值:2日內J莊的最低值=8日內J莊的最低值 輸出AA莊:(J莊上穿1日前的J莊+0.01 AND X莊 AND J莊<19)*0.2,線寬為2 當滿足條件AA莊時,在0.3位置書寫文字,畫綠色 程序源碼DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK2; DEA:EMA(DIFF,9),LINETHICK2; MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2; 低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1; STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW; DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF; DRAWICON(二次金叉,DEA*0.9,1) ; DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背離:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); STICKLINE(底背離,0,0.03,6,0),COLOR00FF00; 底背:DRAWLINE(A1=0,DEA,底背離,DEA,0),COLORRED,LINETHICK4; DRAWTEXT(底背離,0.12,' 底背離'),COLORFF00FF; A2:=BARSLAST(REF(CROSS(DEA,DIFF),1)); 頂背離:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF); 頂背:DRAWLINE(A2=0,DEA,頂背離,DEA,0),COLORGREEN,LINETHICK4; DRAWTEXT(低位金叉 AND 二次金叉 AND 底背離,0.25,'三全項'),COLOR0000FF,LINETHICK2; WWFF : EMA(CLOSE,6) - EMA(CLOSE,13); WEA : EMA(WWFF,5),COLORFF0000; WFF : EMA(CLOSE,6) - EMA(CLOSE,13),COLORRED; 追漲1:0.1; 0; 追漲2:0.2,LINETHICK2; 陽線突破:(REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,1)>OPEN AND CLOSE>REF(OPEN,1) AND CLOSE/OPEN>1.02)*0.3,LINETHICK2; RSV莊:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100); K莊:=SMA(RSV莊,3,1); D莊:=SMA(K莊,3,1); J莊:=3*K莊-2*D莊; X莊:=LLV(J莊,2)=LLV(J莊,8); AA莊:(CROSS(J莊,REF(J莊+0.01,1)) AND X莊 AND J莊<19)*0.2,LINETHICK2; DRAWTEXT (AA莊,0.3,'!--->莊家殺入'),COLORGREEN; 該公式包含未來函數(shù):DRAWLINE |
|