指标公式源码分析及使用说明:
源码:
N1:=6;N2:=12;
LC:=REF(CLOSE,1);
RK:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLOR66FF00;
RM:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100,COLOR66FF00,LINETHICK2;
CXHM1:=(CLOSE-LLV(LOW,80))/(HHV(HIGH,80)-LLV(LOW,80))*200;
CXHM2:=SMA(CXHM1,3,1);
CXHM3:=SMA(CXHM2,3,1);
CXHM4:=3*CXHM2-2*CXHM3;
CXHM5:=LLV(LOW,5);
//www.cxh99.com
CXHM6:=HHV(HIGH,5);
CXHM7:=EMA((CLOSE-CXHM5)/(CXHM6-CXHM5)*100,4)*2;
CXHM8:=EMA(0.667*REF(CXHM7,1)+0.333*CXHM7,2);
CXHM9:=3*CXHM7-2*CXHM8;
CXHA:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);
CXHB:=POW(MA(LOW,5),2)+MA(LOW,5);
CXHC:=POW(MA(HIGH,5),2)+MA(HIGH,5);
CXHD:=(CXHA-LLV(CXHB,64))/(HHV(CXHC,64)-LLV(CXHB,64))*150+65-10;
CXHE:=SMA(CXHD,3,1)*1.5-100;
CXHF:=SMA(CXHE,3,1);
CXHM10:=3*CXHE-2*CXHF;
CXHM11:=(HIGH+LOW+CLOSE*2)/4;
CXHM12:=EMA(CXHM11,13);
CXHM13:=STD(CXHM11,13);
CXHM14:=(CXHM11-CXHM12)*100/CXHM13;
CXHM15:=EMA(CXHM14,5);
CXHM17:=EMA(CXHM15,13)+200-100;
CXHM18:=EMA(CXHM17,10);
CXHM19:=3*CXHM17-2*CXHM18;
CXH1A:=CXHM2+CXHM7+CXHE+CXHM17;
CXH1B:=CXHM3+CXHM8+CXHF+CXHM18;
CXH1C:=CXHM4+CXHM9+CXHM10+CXHM19;
CXH1D:=(HIGH+LOW+CLOSE)/3;
CXHM20:=(CXH1D-MA(CXH1D,34))/(0.015*AVEDEV(CXH1D,34));
CXHM22:=(HIGH+LOW+CLOSE+CXH1D)/4;
CXHM23:=EMA(CXHM22,24);
CXHM24:=STD(CXHM22,24);
CXHM25:=(CXHM22-CXHM23)/CXHM24*100;
CXHM26:=(CXH1D-MA(CXH1D,24))/(0.015*AVEDEV(CXH1D,24));
CXHM27:=EMA(CXHM25,5);
CXH2A:=((CXHM27+CXHM26+CXHM20)/3+165)/4;
CXH2C:=(CXH1A+CXH1B+CXH1C*30)/32/5-15;
CXH2E:=(CXH2A+CXH2C)/2/1.1;
MK:EMA(CXH2E,3),COLORFF00FF;
MM:EMA( MK,5),COLORFF00FF,LINETHICK2;
DRAWTEXT((CROSS(RM,RK) AND REF(RM,1)>60),RM-5,'V'),colorred;
DRAWTEXT((CROSS(MK,MM) AND MM<20),MM-5,'↑'),COLORGREEN;//http://www.cxh99.com
DRAWICON(RK>78,RK-5,2);
Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;
Q3:=SMA(Q2, 9, 1);
Q4:=SMA(Q3, 3, 1);
短期趋势:=3*Q3-2*Q4,NODRAW;
中期趋势:=EMA(Q3, 3),NODRAW;
CXHD3:=PEAKBARS(3,5,1)<10;
CXHD5:=IF(CXHD3=1,2,0);
顶:= IF(CXHD5=2,2,0);
顶A:IF(顶>REF(顶,1),50,0),colorgreen, LINETHICK2;
DRAWTEXT(顶A=50,5,'跑顶'),COLOR00FF00;
威廉波段:100-(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100;
威廉风险:IF(威廉波段>95,95,110);
威廉顶部:威廉风险;
WLDB:IF(威廉波段<5,-4,-10);
威廉底部:WLDB;
N:=3;
CXH01:=MA(HHV(HIGH,485),17);
CXH02:=MA(HHV(HIGH,222),17);
CXH03:=MA(HHV(HIGH,96),17);
CXH04:=MA(LLV(LOW,485),17);
CXH05:=MA(LLV(LOW,222),17);
CXH06:=MA(LLV(LOW,96),17);
CXH07:=MA((CXH04*0.96+CXH05*0.96+CXH06*0.96+CXH01*0.558+CXH02*0.558+CXH03*0.558)/6,17);
CXH08:=MA((CXH04*1.25+CXH05*1.23+CXH06*1.2+CXH01*0.55+CXH02*0.55+CXH03*0.65)/6,17);
CXH09:=MA((CXH04*1.3+CXH05*1.3+CXH06*1.3+CXH01*0.68+CXH02*0.68+CXH03*0.68)/6,17);
CXH10:=MA((CXH07*3+CXH08*2+CXH09)/6*1.738,17);
CXH11:=IF(DATE<=1050531,CXH10,CXH10*DAY);
CXH12:=LOW;
CXH13:=REF(LOW,1);
CXH14:=SMA(ABS(CXH12-CXH13),3,1)/SMA(MAX(CXH12-CXH13,0),N,1)*100;
CXH15:=MA(IF(CLOSE*1.35<=CXH11,CXH14*10,CXH14/10),N);
CXH16:=LLV(LOW,30);
CXH17:=HHV(CXH15,30);
CXH18:=1990831;
CXH19:=IF(DATE<=CXH18,MA(IF(LOW<=CXH16,(CXH15+CXH17*2)/2,0),N),100000000);
CXH20:=(HHV(H,9.8)-C)/(HHV(H,9.8)-LLV(L,9.8))*100;
CXH21:=SMA(CXH20,3,1);
CXH22:=SMA(CXH21,3,1);
CXH23:=3*CXH21-2*CXH22;
CXH24:=IF(CXH23>=100,100,IF(CXH23<=0,0,CXH23));
CXH36:=100-((100*((HHV(HIGH,17))-CLOSE))/((HHV(HIGH,17))-(LLV(LOW,17))));
CXH37:=100-(MA(((100*((HHV(HIGH,17))-CLOSE))/((HHV(HIGH,17))-(LLV(LOW,17)))),4));
CXH38:=MA(CXH37,1);
CXH39:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
MC:IF((CXH24=0),100,110);
卖出:MC,COLORFF00FF,LINETHICK2;;
CD:IF(CXH39<5,-2,-10);
抄底:CD,COLOR00FFFF,LINETHICK2;
DB:IF(CXH19>10000 AND CXH19>20000,0,-10);
STICKLINE(1,80,80,2,0),COLORFFFF00;
STICKLINE(1,50,50,2,0),COLORFF0000;STICKLINE(1,50,50,2,0),COLORFF0000;
35;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),colorwhite;
D:SMA(K,3,1),coloryellow;
J:3*K-2*D,COLORFF00FF;
A:=250;
N:=0;
M:=0;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD=2*(DIFF-DEA);
CXHC1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
CXHC2:=SMA(ABS(LOW-CXHC1),13,1)/SMA(MAX(LOW-CXHC1,0),10,1);
CXHC3:=EMA(CXHC2,10);
CXHC4:=LLV(LOW,33);
CXHC5:=EMA(IF(LOW<=CXHC4,CXHC3,0),3);
CXHC6:=0,NODRAW;
主力进场:=IF(CXHC5>REF(CXHC5,1),CXHC5,0),colorred,NODRAW;
STICKLINE(CXHC5>REF(CXHC5,1),0,CXHC5,3,0 ),colorred;
洗盘:=IF(CXHC5<REF(CXHC5,1),CXHC5,0),colorgreen,NODRAW;
STICKLINE(CXHC5<REF(CXHC5,1),0,CXHC5,3,0),COLORGREEN;//http://www.cxh99.com
IF(J>91 AND D>40 OR D>80) N=N+2;
IF(J>91 AND D>80) N=N+3;
IF(J>100 AND N>0) N=N+1;
IF(J>110 AND N>0) N=N+1;
IF(卖出=100) N=N+2;
IF(顶A=50) N=N+1;
IF(威廉顶部=95) N=N+1;
IF((CROSS(RM,RK)AND REF(RM,1)>60) OR RK>78) N=N+5;
DRAWTEXT((CROSS(RM,RK)AND REF(RM,1)>60),RM-5,'V'),colorred;
DRAWTEXT((CROSS(MK,MM)AND MM<20),MM-5,'↑'),COLORGREEN;//http://www.cxh99.com
DRAWICON(RK>80,RK-5,2);
顶A:IF(N>0,25*N,0),colorgreen, LINETHICK2;
DRAWTEXT(N>0,25*N+5,'跑'+N),COLORGREEN;//http://www.cxh99.com
减仓位:IF(N>0,N/10*100,'0'),COLORGREEN;//http://www.cxh99.com
DRAWICON(N>0,110,2);
IF(J<3) M=M+2;
IF(J<3 AND D<30) M=M+1;
IF(J<0 AND M>0) M=M+1;
IF(J<-10 AND M>0) M=M+1;
IF(REF(J,1)<0 AND M>0) M=M+1;
IF(洗盘>1) M=M+4;
IF(主力进场>10) M=M+1;
IF(抄底=-2) M=M+1;
IF(威廉底部=-4) M=M+1;
IF((CROSS(MK,MM)AND MM<20)) M=M+4;
IF(MM<10 AND M>0) M=M+1;
DRAWTEXT(M>0,20*M,'↑进'+M),colorred;
加仓位:IF(M>0 ,M/10*100+'%','0'),colorred;
DRAWICON(M>0 ,-15,1);
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
发表评论