当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:出单OR止损公式,精准抓妖,智能MACD

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、出单OR止损公式,出单点标,提醒出单止损

网上选股指标多如牛毛,出单指标几乎凤毛麟角。
许多人做单亏钱原因,很多情况是买的股是对的,不知什么时候出单,赚钱变亏钱,错单变套单!
指标很简洁,就是多空二个信号,在信号没出现之前,可以提前择优出单;指标信号出现后,表示是最后的时机。
比较准;下了单后,我就看这个指标,出现信号了,必需无条件出!
这个指标,也可以用于选股,在高位的红箭信号,尽量不用;也可以用于融券做空,看期货行情也较好!

X_15:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
X_16:=REF(X_15,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_17:=REF(X_16,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_18:=REF(X_17,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_19:=REF(X_18,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_20:=REF(X_19,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_21:=REF(X_20,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_22:=REF(X_21,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_23:=REF(X_22,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_24:=REF(X_23,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_25:=REF(X_24,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_26:=REF(X_25,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_27:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
X_28:=REF(X_27,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_29:=REF(X_28,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_30:=REF(X_29,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_31:=REF(X_30,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_32:=REF(X_31,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_33:=REF(X_32,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_34:=REF(X_33,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_35:=REF(X_34,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_36:=REF(X_35,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_37:=REF(X_36,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_38:=REF(X_37,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_39:=REF(X_27 OR X_28 OR X_29 OR X_30 OR X_31 OR X_32 OR X_33 OR X_34 OR X_35 OR X_36 OR X_37 OR X_38,1) AND X_15;
X_40:=REF(X_15 OR X_16 OR X_17 OR X_18 OR X_19 OR X_20 OR X_21 OR X_22 OR X_23 OR X_24 OR X_25 OR X_26,1) AND X_27;
空单出场:IF(X_39,1,0),COLORRED;
多单出场:IF(X_40,1,2),COLORCYAN;



2、精准抓妖,抄底99%

公式可以设置预警,99%都是相对底部(大家要清楚,没有最低只有更低),所以建议等信号出现后第二天再择机买入成功率会大大增加!
公式不加密,没有未来函数,放心使用。有能力的请进一步优化和做预警!
 
 

A00:=SUM(IF((C> REF(C,1)),VOL,IF((C<REF(C,1)),(0-V),0)),0);
A01:=SUMBARS(V,CAPITAL);
A02:=IF((C>LLV(C,A01)),1,(0-1))*IF((A00 >LLV(A00,A01)),1,(0-1));
A03:=(COUNT((IF((A02=(0-1)),1,0)=1),8)>2);
A04:=((C-DMA((((3 * H + L)+O)+2 * C)/7.000,V/SUM(AMOUNT,13)/
AMOUNT/V/100/100))/DMA((((3*H+L)+O)+2*C)/7,V/SUM(AMOUNT,13)/
AMOUNT/V/100/100)*100<(0-18));
A05:=((C-MIN(REF(C,5)*0.865,REF(C,21)*0.772))/C<0.009);
A06:=((A03 AND A04) AND A05);
A07:=((((O < EMA(C,5)) AND (C/O>=1.05)) AND (V/CAPITAL>=0.019)) AND (V/CAPITAL<=0.2));
A08:=(A07 AND (COUNT(A07,5)=1));
A0901:=MA(C,3)>REF(MA(C,3),1);
A0902:=MA(C,5)>REF(MA(C,5),1);
A0903:=MA(C,10)>REF(MA(C,10),1);
A0904:=V/240>REF(V,30)*1.200/240.000*1.500;
A0905:=C>L*1.059;
A0906:=C>REF(MA(C,3),1);
A0907:=A0901 AND A0902 AND A0903 AND A0904 AND A0905 AND A0906;
A0908:=A0907 AND REF(C,1);
A0909:=MA(C,20)>REF(MA(C,20),1);
A0910:=MA(V,5)>REF(MA(V,5),1);
A0911:=MA(C,5)-MA(C,10);
A0912:=A0911<= 0.579;
A09:=A0908 AND A0902 AND A0903 AND A0909 AND A0910 AND A0912;A0A:=FILTER(A09,5.000);
VBB:=(A06 OR A07) AND A0A;
IF(VBB,1,0),COLORYELLOW;
确认成妖:DRAWTEXT(VBB,0.85,'抓妖'),COLORRED;



3、智能MACD 用过的最好的MACD

指标非原创,只是这个M,ACD 比较简洁,挺好用的( 顶尖财经 股票学院: http://www.58188.com )
是我用过最清晰明了的MACD 指标,因用到底背离划线,因此会显示未来函数

{DRAWGBK(C>0, RGB(0,108,108),RGB(88,0,0),0,'11',0);}
SHORT:=12;LONG:=26;MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;
HJ_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
HJ_3:=LLVBARS(MACD,HJ_2+20);
HJ_4:=IF(HJ_3>HJ_2,REF(MACD,HJ_3),0);
HJ_5:=MACD<0 AND MACD>HJ_4 AND LOW=LLV(LOW,HJ_2+20) AND HJ_4<0;
HJ_6:=REF(HJ_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ_3)<0 AND MACD<0;
底背:DRAWLINE(HJ_4=HJ_3,MACD,HJ_6,MACD,0),COLORRED,DOTLINE;
DRAWICON(HJ_6,MACD*1.2,9);
HJ_7:=HHVBARS(MACD,HJ_2+20);
HJ_8:=IF(HJ_7>HJ_2,REF(MACD,HJ_7),0);
HJ_9:=MACD>0 AND MACD<HJ_8 AND HIGH=HHV(HIGH,HJ_2+20) AND HJ_8>0;
HJ_10:=REF(HJ_9,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,HJ_7)>0;
顶背:DRAWLINE(HJ_8=HJ_7,MACD,HJ_10,MACD,0),COLOR1D7300,DOTLINE;
DRAWICON(HJ_10,MACD*1.2,15);
HJ_11:=CLOSE/MA(CLOSE,40)*100<78;
HJ_12:=CLOSE/MA(CLOSE,60)*100<74;
HJ_13:=HIGH>LOW*1.051;
HJ_14:=HJ_13 AND COUNT(HJ_13,5)>1;
HJ_15:=IF(HJ_14 AND (HJ_11 OR HJ_12),2,0);
HJ_16:=CLOSE/REF(CLOSE,25)<=1.1;
HJ_17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
HJ_18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
HJ_19:=SMA(HJ_18,2,1);
HJ_20:=SMA(HJ_19,2,1);
HJ_21:=IF(HJ_19>REF(HJ_19,1) AND REF(HJ_19,1)<REF(HJ_19,2) AND HJ_19<23,1.5,0);
HJ_22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
HJ_23:=MA(CLOSE,5);
HJ_24:=IF(CLOSE>SAR(10,2,20),1,0);
HJ_25:=IF(CLOSE<SAR(10,2,20),(-1),0);
HJ_26:=ATAN((HJ_23/REF(HJ_23,1)-1)*100)*180/3.1416;
HJ_27:=IF(HJ_26>30,1,0);
HJ_28:=IF(HJ_26<(-30),(-1),0);
HJ_29:=HJ_24+HJ_27+HJ_25+HJ_28;
IF(HJ_29<(-1) OR HJ_22<25.01,DIF,DRAWNULL),COLOR1D7300;
IF(HJ_22>74.989998 OR HJ_29>0,DIF,DRAWNULL),COLORRED;
0,COLORBROWN,POINTDOT;

上一篇:通达信源码:好多宝,抄底王,牛熊分界线

下一篇:通达信源码:超牛底部启动点,龙头启动,分时高抛低吸