C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- N,45,1,100,1
- M1,2,2,40,1
- M2,5,2,40,1
- M3,12,2,30,1
- vhf:= (HHV(CLOSE,26)-LLV(CLOSE,26))/SUM(ABS(CLOSE-REF(CLOSE,1)),26);
- vm:= ma (vhf,7);
- TR:= EMA(EMA(EMA(CLOSE,m3),m3),m3);
- TRIX := (TR-REF(TR,1))/REF(TR,1)*100;
- TRMA := MA(TRIX,15);
- m5:=ma (close,5);
- m10:=ma (close,10);
- m20:=ma (close,20);{定义均线}
- v10:=ma (vol,10);
- m60:=ma (close,60);
- m30:=ma (close,30);
-
- V51:=ref(MA(c,60),1);V6:=ref(MA(c,120),1);V7:=ref(MA(c,250),1);
-
- v3:=ma (vol,3);
- v5:=ma (vol,5);{定义均量线,均线}
- RSV:= (CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
- K:=SMA(RSV,M1,1);
- D:=SMA(K,M2,1);
- obv:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
- {定义obv}
-
- a0:=hhv(ma(v,6),5)-llv(ma(v,6),5);
- a1:=v>ma(v,5)*1.5 and a0>0 and a0/hhv(ma(v,6),5)*100>40;
-
- zj1:=((abs(m5-m10)/close<0.04 {and abs(v51-v6)/close<0.04 and abs(v6-v7)/close<0.04}
-
- or (((abs (m5-(m5+m10+m20)/3))/(m5+m10+m20)/3<0.03)
- and ((abs (m10-(m5+m10+m20)/3))/(m5+m10+m20)/3<0.03))
-
- or vm<max (ref (vm,2),ref (vm,3))){均线和股价胶着}
- and close > m10 and obv> max (ref (obv,1),ref (obv,2))
- and obv> max (ref (obv,4),ref (obv,5))
- {股荚?0日均线之上,且三日内obv上升}
- and ((ref ((ma (vol,5)),1))>(ref ((ma (vol,5)),2))and
- (ref ((ma (vol,5)),2))>(ref ((ma (vol,5)),3))and
- (ref ((ma (vol,5)),3))>(ref ((ma (vol,5)),4)){1,前三日内5日均量线上升}
- or ((close-m5)/m5*100<-7{5bias小于-7****}
- and "kd.k"<8 and "kd.d"<15 and
- CROSS("KDJ.J"(N,M1,M2),0)){kd在低位}
- or ref (v10,3)> max (ref (v10,4),ref (v10,5)))
- or ((high-close)/close<=0.019 and close>ref (close,1) and (close-ref
- (close,1))/ref(close,1)>=0.05 and (close-m5)/m5*100<18){小上影线且是阳线
- 且5bias不可过18} and trma<trix)
-
- and(( close>m5{收盘在5日均线之上}
- and m5>m10 and m10>m30 {均线多头排列}
- and m60>ref (m60,1) and ref (m60,2)>ref (m60,3)
- and ref (m60,4)>ref (m60,5){60均线在向上}
- and v3>max (ref (v3,1),ref (v3,2)){3日均量线在3日内向上}
- and (vol<=v3*2 or ((high-close)/close)<0.01){量不得大于
- 3日均量的2倍 or 收沤咏峭?***}
- and trma<trix)
-
- or ((high-close)=0 and close>ref (close,1)
- and (close-ref(close,1))/ref(close,1)>=0.05 ){光头的涨幅过5%阳线}
-
- or ((close-m5)/m5*100<-7{或者说bias小于-7****}
- and "kd.k"<8 and "kd.d"<15 and CROSS("KDJ.J"(N,M1,M2),0)))
-
- and ("arbr.br"<277
- and (high-close)/abs(close-open)<2.3){br不可小于277 和不要上影さ膤
- and (not (CROSS(D,K) AND D>80)){不选kd发出卖出信号的}
- and vhf>vm and a1
-
- {and abs(v51-v6)/min(v51,v6)<=0.2 and
- abs(v51-v7)/min(v51,v7)<=0.2 and
- abs(v6-v7)/min(v6,v7)<=0.1};
-
- zj1 AND (REF(BARSLAST(zj1),1)>20 OR BARSSINCE(zj1)=0);