当前位置:→ 公式网 > 大智慧公式 > 正文 ℃ 公式解密、改选股等业务 联系点击查看详情...
以下是K线形态(无源码的请下载附件导入)
很多同学喜欢研究k线形态,我把上涨k线和下跌k线形态用红绿柱显示出来,简单直观。红绿柱代表出现了符合形态的k线形态,柱体高度是出现的频率。简单来说红柱子越多越高,说明出现上涨k线形态的次数越多,绿柱子同理。
这个源码公式作为送给理想论坛同学们的新年礼物,祝愿同学们2010年财源滚滚!!
C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- {下跌K线}
- 骤跌并排红:=REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (ABS(OPEN-REF(OPEN,1))/OPEN)<0.001 AND REF(HIGH,1)<REF(LOW,2) AND HIGH<REF(LOW,2);
- 中阴线:=OPEN>CLOSE AND ABS(OPEN-CLOSE)>EMA(ABS(CLOSE-OPEN),60) AND ABS(OPEN-CLOSE)<EMA(ABS(HIGH-LOW),60);
- 小阴线群:=COUNT(EMA(ABS(CLOSE-OPEN),60)/4<(OPEN-CLOSE) AND (OPEN-CLOSE)<EMA(ABS(CLOSE-OPEN),60) AND (O-C)/(H-L)>0.6,4)>=3;
- 阴后双阳阴:=CLOSE<OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,3)<REF(OPEN,3) AND CLOSE=LLV(CLOSE,4) AND
- REF(H,2)<REF(H,3) AND REF(L,2)>REF(L,3) AND REF(H,1)<REF(H,3) AND REF(L,1)>REF(L,3) AND REF(O,3)/REF(C,3)>1.02;
- 下降三法:=REF(CLOSE,4)/REF(OPEN,4)<0.97 AND REF(CLOSE,3)>REF(OPEN,3) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND
- REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND
- REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,4);
- V1:=ABS(C-O)/(H-L)>0.3;
- 下跌会合线:=REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<OPEN AND H=REF(O,1) AND ABS(C-O)/(H-L)>0.3 AND REF(ABS(C-O)/(H-L)>0.3,1) AND
- ABS(ABS(O-C)-ABS(REF(O,1)-REF(C,1)))/C<0.01 AND REF(C,1)<MA(C,5);
- 乌云笼罩:=REF(CLOSE,1)/REF(OPEN,1)>1.02 AND CLOSE/OPEN<0.99 AND OPEN>REF(CLOSE,1) AND CLOSE<REF(CLOSE,1)-(1/2)*(REF(CLOSE,1)-REF(OPEN,1)) AND
- ABS(C-O)/(H-L)>0.7 AND REF(ABS(C-O)/(H-L)>0.7,1) AND H>=HHV(C,20);
- 死蜘蛛:=COUNT(CROSS(MA(CLOSE,20),MA(CLOSE,5)),2)=1 and COUNT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),2)=1;
- 双飞乌鸦:=REF(C,2)/REF(O,2)>=1.02 AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND CLOSE/OPEN<0.98;
- 射击之星:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5);
- 黄昏十字星:=REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))>ema(ABS(CLOSE-OPEN),60) AND REF(CLOSE,1)=REF(OPEN,1) AND REF(CLOSE,1)>REF(CLOSE,2)
- AND OPEN>CLOSE AND CLOSE<REF(OPEN,2)-(1/2)*(REF(OPEN,2)-REF(CLOSE,2)) AND OPEN<MAX(REF(CLOSE,1),REF(OPEN,1)) and ref(c,1)>ma(c,20);
- 三只乌鸦:=REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND REF(CLOSE,1)<REF(CLOSE,2) AND CLOSE<REF(CLOSE,1) AND
- OPEN<REF(OPEN,1) AND REF(OPEN,1)<REF(OPEN,2) AND REF(C,3)/REF(O,3)>=1.02;
- 平顶:=ABS(H-REF(H,1))/H<0.001 AND HHV(H,2)=HHV(H,20) AND ABS(C-O)/(H-L)>0.8 AND REF(ABS(C-O)/(H-L)>0.8,1);
- 空方炮:=CLOSE<OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND CLOSE<REF(OPEN,1) AND CLOSE<REF(CLOSE,2) AND
- REF(H,1)<REF(H,2) and ref(abs(c-o)/(h-l)>0.5,1);
- 看跌吞没形态:=REF(CLOSE,1)>REF(OPEN,1) AND OPEN>CLOSE AND OPEN>REF(CLOSE,1) AND CLOSE<REF(OPEN,1) AND HIGH>REF(HIGH,1) AND LOW<REF(LOW,1) and ref(c,1)
- >ma(c,10);
- 看跌提腰带:=OPEN=HIGH AND CLOSE<>LOW AND (CLOSE-LOW)>0.328*(OPEN-CLOSE) AND OPEN>CLOSE AND (ABS(OPEN-CLOSE)>ema(ABS(HIGH-LOW),60) OR (ABS(OPEN-CLOSE)
- >ema(ABS(CLOSE-OPEN),60) AND ABS(OPEN-CLOSE)<ema(ABS(HIGH-LOW),60)));
- 九阴白股爪:=CLOSE<OPEN AND REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,4)<REF(OPEN,4) AND
- REF(CLOSE,5)<REF(OPEN,5) AND REF(CLOSE,6)<REF(OPEN,6) AND REF(CLOSE,7)<REF(OPEN,7) AND REF(CLOSE,8)<REF(OPEN,8);
- 黄昏之星:=REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))>ema(ABS(CLOSE-OPEN),60) AND ABS(REF(CLOSE,1)-REF(OPEN,1))<(1/4)*ema(ABS(CLOSE-
- OPEN),60)
- AND MAX(REF(CLOSE,1),REF(OPEN,1))>REF(CLOSE,2) AND OPEN>CLOSE AND CLOSE<REF(OPEN,2)-(1/2)*(REF(OPEN,2)-REF(CLOSE,2)) AND OPEN<MAX(REF(CLOSE,1),REF
- (OPEN,1)) and ref(c,1)>ma(c,20);
- 断头铡刀:=CLOSE<OPEN AND CLOSE<MA(CLOSE,20) AND CLOSE<MA(CLOSE,10) AND CLOSE<MA(CLOSE,5) AND HIGH>MA(CLOSE,5) AND HIGH>MA(CLOSE,10) AND HIGH>MA
- (CLOSE,20) ;
- 叠V1:=CLOSE<OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND CLOSE<REF(OPEN,1) AND CLOSE<REF(CLOSE,2);
- 叠V2:=V1 AND REF(V1,2) AND C<REF(C,4);
- 叠叠空方炮:=叠V1 and 叠V2;
- 吊颈线:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE > MA(CLOSE,5);
- 长上影线:=high-max(open,close)>1.2*ema(h-l,60);
- 信号1:=骤跌并排红+中阴线+小阴线群+阴后双阳阴+下降三法+下跌会合线+乌云笼罩+死蜘蛛+双飞乌鸦+射击之星+黄昏十字星+三只乌鸦+平顶+空方炮+看跌吞没形态+看跌提腰带+九阴白股爪+黄昏之星+断头铡刀+叠叠空方炮+吊颈线+长上影线;
- {上涨k线}
- 长下影线:=(MIN(CLOSE,OPEN)-LOW)>EMA(ABS(HIGH-LOW),60) AND (MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.5;
- 出水芙蓉:=CLOSE>OPEN AND LOW<MA(CLOSE,20) AND LOW<MA(CLOSE,40) AND LOW<MA(CLOSE,30) AND
- LOW<MA(CLOSE,60) AND CLOSE>MA(CLOSE,30) AND CLOSE>MA(CLOSE,20) AND CLOSE>MA(CLOSE,40) AND
- CLOSE>MA(CLOSE,60) AND CLOSE>MA(CLOSE,5) AND C=HHV(C,20) AND REF(HHV(H,10),1)/REF(LLV(H,10),1)<1.05 AND (CLOSE-OPEN)>0.02*CLOSE;
- 倒锤子:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW > 3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5);
- 叠V1:=CLOSE>OPEN AND REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,2)>REF(OPEN,2) AND CLOSE>REF(OPEN,1) AND CLOSE>REF(CLOSE,2);
- 叠V2:=叠V1 AND REF(叠V1,2) AND C>REF(C,4);
- 叠叠多方炮:=叠V1 and 叠V2 ;
- 东方红连阳:=CLOSE>OPEN AND REF(CLOSE>OPEN,1) AND REF(CLOSE>OPEN,2) AND REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,4) and (c-ref(c,5))/ref(c,5)<=0.12;
- 多V0:=ABS(CLOSE-OPEN)/(HIGH-LOW)>0.5;
- 多方炮:= 多V0 and REF(多V0,2) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN AND CLOSE>REF(CLOSE,2) AND CLOSE>REF (OPEN,1) AND REF(C,1)<REF(C,2) AND LOW<REF(C,1) ;
- 剧涨并排红:=REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (ABS(OPEN-REF(OPEN,1))/OPEN)<0.005 AND REF(OPEN,1)>REF(CLOSE,2) AND
- LLV(LOW,2)>REF(HIGH,2) AND ABS(CLOSE-OPEN)/(HIGH-LOW)>0.8 AND REF(ABS(CLOSE-OPEN)/(HIGH-LOW)>0.8,1);
- 金蜘蛛:=COUNT(CROSS(MA(CLOSE,10),MA(CLOSE,20)),2)=1 and COUNT(CROSS(MA(CLOSE,5),MA(CLOSE,20)),2)=1;
- 看涨提腰带:=OPEN=LOW AND CLOSE<>HIGH AND (HIGH-CLOSE)>0.382*(CLOSE-OPEN) AND CLOSE>OPEN AND ((CLOSE-OPEN)>(SUM(ABS(HIGH-LOW),60))/60 OR (ABS(CLOSE- OPEN)>SUM(ABS(CLOSE-OPEN),60)/60 AND ABS(CLOSE-OPEN)<SUM(ABS(HIGH-LOW),60)/60));
- 早晨之星:=REF(CLOSE,2)<REF(OPEN,2) AND (REF(OPEN,2)-REF(CLOSE,2))>SUM(ABS(CLOSE-OPEN),60)/60 AND ABS(REF(OPEN,1)-REF(CLOSE,1))<(1/4)*SUM (ABS(CLOSE- OPEN),60)/60 AND MIN(REF(OPEN,1),REF(CLOSE,1))<REF(CLOSE,2) AND CLOSE>OPEN AND CLOSE*2>(REF(CLOSE,2)+ref(OPEN,2));
- 早晨十字星:=REF(CLOSE,2)<REF(OPEN,2) AND (REF(OPEN,2)-REF(CLOSE,2))>ema(ABS(CLOSE-OPEN),60) AND REF(CLOSE,1)=REF(OPEN,1) AND
- REF(OPEN,1)<REF(CLOSE,2) AND CLOSE>OPEN AND CLOSE>REF(CLOSE,2)/2+REF(OPEN,2)/2;
- 上升三法:=REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND
- REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND
- REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4);
- 阳后双阴阳:=CLOSE>OPEN AND REF(CLOSE,1)<REF(OPEN,1) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,3)>REF(OPEN,3) AND CLOSE>REF(CLOSE,3) and
- ref(low,2)<high and ref(low,1)<high and ref(close,3)/ref(open,3)>1.02 and close/open>1.02;
- 阳包阴:=REF(OPEN,1)>REF(CLOSE,1) AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1) AND HIGH>REF(HIGH,1) AND LOW<REF(LOW,1) AND CLOSE>OPEN AND
- (CLOSE-OPEN)>(ema((HIGH-LOW),60)) ;
- 小阳线群:=COUNT((close-open)>ema(abs(close-open),60)/4 and (close-open)<ema(abs(close-open),60) and (close-open)/(high-low)>0.3,5)>=4;
- 上涨分离线:=ref(c,1)<ref(o,1) and ref(h,1)=ref(o,1) and c>o and o=l and hhv(c,10)=c and abs(o-ref(o,1))/o<0.001 and abs((c-o)-(ref(o,1)-ref (c,1)))/o<0.005;
- 上涨红三兵:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND (CLOSE-OPEN)>=REF((CLOSE-OPEN),1) AND
- REF((CLOSE-OPEN),1)>=REF((CLOSE-OPEN),2) AND OPEN>REF(OPEN,1) AND REF(OPEN,1)>REF(OPEN,2);
- 上涨会合线:=REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<OPEN AND REF(CLOSE,1)=low and hhv(c,10)<=high and abs(open-close)/(h-l)>0.3 and ref(abs(open-close)/ (h-l)>0.3,1);
- 曙光初现:=ref(close,2)/ref(open,2)<0.97 and ref(c,2)<ref(c,3) and ref(open,1)<ref(close,2) and ref(close,1)>ref(close,2) and
- ref(close,1)>(ref(close,2)+ref(open,2))/2 and close>ref(close,1) and llv(low,13)=ref(low,1);
- 铁锤:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) ;
- 仙人指路:=c<ref(c,1) and ref(c,1)<ref(c,2) and REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,3)>REF(OPEN,3) AND
- REF(HIGH,3)-REF(CLOSE,3)>(REF(CLOSE,3)-REF(OPEN,3)) AND ref(c,3)>ref(c,4) and REF(HIGH,3)-REF(CLOSE,3)>REF(CLOSE,3)-REF(LOW,3) AND
- hhv(h,30)=ref(h,3) and REF(CLOSE,4)>REF(close,5) AND REF(CLOSE,5)>REF(close,6) ;
- 剑:=VOL>REF(VOL,1) and OPEN>=(REF(HIGH,1)) and REF(HIGH,1)>(REF(HIGH,2)*1.06) and CLOSE>(REF(CLOSE,1))-(REF(CLOSE,1)*0.01)
- and CLOSE<(HIGH*0.965) and HIGH>(OPEN*1.05) and LOW<OPEN and LOW<CLOSE and HIGH>(REF(CLOSE,1)*1.06) and (HIGH-(MAX(OPEN,CLOSE)))/2>(MIN(OPEN,CLOSE))-LOW
- and (ABS(OPEN-CLOSE))/2<(MIN(OPEN,CLOSE)-LOW);
- 信号2:=长下影线+出水芙蓉+倒锤子+叠叠多方炮+东方红连阳+多方炮+剧涨并排红+金蜘蛛+看涨提腰带+早晨之星+早晨十字星+上升三法+阳后双阴阳 +阳包阴+小阳线群+上涨分离线+上涨红三兵+上涨会合线+曙光初现+铁锤+仙人指路+剑;
- STICKLINE(信号1,0,-信号1,6,0),colorgreen;
- STICKLINE(信号2,0,信号2,6,0),colorred;
- 0;