程序源碼 STICKLINE(MA(V,5)>MA(V,10),0.6,1.4,4,0)COLORLIMAGENTA; STICKLINE(MA(V,5)<MA(V,10),0.6,1.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,1,' 籌碼'),COLORFFFFFF; TYP:=(HIGH+LOW+CLOSE)/3; cci:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); STICKLINE(CCI>0,1.6,2.4,4,0)COLORLIMAGENTA; STICKLINE(CCI<0,1.6,2.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,2,' CCI'),COLORFFFFFF; DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIFF,9); STICKLINE(DIFF>DEA,2.6,3.4,4,0)COLORLIMAGENTA; STICKLINE(DIFF<DEA,2.6,3.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,3,' macd'),COLORFFFFFF; CC:=(C+O+H+L)/4; STICKLINE(CC>SAR(4,2,20),3.6,4.4,4,0)COLORLIMAGENTA; STICKLINE(CC<sar(4,2,20),3.6,4.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,4,' SAR'),COLORFFFFFF; LC:=REF(CLOSE,1); rsi1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100; RSI2:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100; STICKLINE(RSI1>RSI2,4.6,5.4,4,0)COLORLIMAGENTA; STICKLINE(RSI1<RSI2,4.6,5.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,5,' RSI'),COLORFFFFFF; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); STICKLINE(K>D,5.6,6.4,4,0)COLORLIMAGENTA; STICKLINE(K<D,5.6,6.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,6,' kdj'),COLORFFFFFF; VAR1:=(2*CLOSE+HIGH+LOW)/4; VAR2:=EMA(EMA(EMA(VAR1,4),4),4); J:=(VAR2-REF(VAR2,1))/REF(VAR2,1)*100; DD:=MA(J,3); KK:=MA(J,1); STICKLINE(KK>DD,6.6,7.4,4,0)COLORLIMAGENTA; STICKLINE(KK<DD,6.6,7.4,4,0)COLORGREEN; DRAWTEXT(ISLASTBAR=1,7,' CJDX'),COLORFFFFFF; T:=MA(V,5)>MA(V,10) AND CCI>0 AND DIFF>DEA AND CC>SAR(4,2,20) AND RSI1>RSI2 AND K>D AND KK>DD; 七指共振:IF(T AND REF(T,1)=0,7.4,DRAWNULL)STICK,COLORRED,LINETHICK6; DRAWTEXT(T AND REF(T,1)=0,0.3,' 七指共振')COLORRED; DRAWICON(T AND REF(T,1)=0,0,1); N1:=IF(crOSS(MA(V,5),MA(V,10)),1,0); N2:=IF(CROSS(CCI,0),1,0); N3:=IF(CROSS(DIFF,DEA),1,0); N4:=IF(CROSS(CC,SAR(4,2,20)),1,0); N5:=IF(CROSS(RSI1,RSI2),1,0); N6:=IF(CROSS(K,D),1,0); N7:=IF(CROSS(KK,DD),1,0); 共振個數(shù):N1+N2+N3+N4+N5+N6+N7,NODRAW; 注: 館內(nèi)各種公式為學(xué)習(xí)編程而保存,實戰(zhàn)使用前一定要看其中是否有未來函數(shù)并自己親自測試成功率,決不能依據(jù)公式名稱的描述和形容去投資,據(jù)此入市造成投資損失由投資者自己承擔(dān)。 發(fā)文不易,如獲益,歡迎贊賞,贊賞必復(fù)! |
|
來自: 追夢文庫 > 《交易系統(tǒng)》