写一个通达信双响炮预警公式 非涨停
时间: 2024-04-28 08:19:05 浏览: 243
通达信系统公式编写教程
5星 · 资源好评率100%
通达信双响炮预警公式如下(假设您要监测的是股票的日线级别):
C1:=REF(CLOSE,1);
C2:=REF(CLOSE,2);
C3:=REF(CLOSE,3);
C4:=REF(CLOSE,4);
C5:=REF(CLOSE,5);
C6:=REF(CLOSE,6);
C7:=REF(CLOSE,7);
C8:=REF(CLOSE,8);
C9:=REF(CLOSE,9);
C10:=REF(CLOSE,10);
C11:=REF(CLOSE,11);
C12:=REF(CLOSE,12);
C13:=REF(CLOSE,13);
C14:=REF(CLOSE,14);
C15:=REF(CLOSE,15);
C16:=REF(CLOSE,16);
C17:=REF(CLOSE,17);
C18:=REF(CLOSE,18);
C19:=REF(CLOSE,19);
C20:=REF(CLOSE,20);
C21:=REF(CLOSE,21);
C22:=REF(CLOSE,22);
C23:=REF(CLOSE,23);
C24:=REF(CLOSE,24);
C25:=REF(CLOSE,25);
C26:=REF(CLOSE,26);
C27:=REF(CLOSE,27);
C28:=REF(CLOSE,28);
C29:=REF(CLOSE,29);
C30:=REF(CLOSE,30);
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
MA250:=MA(CLOSE,250);
V1:=REF(VOL,1);
V2:=REF(VOL,2);
V3:=REF(VOL,3);
V4:=REF(VOL,4);
V5:=REF(VOL,5);
V6:=REF(VOL,6);
V7:=REF(VOL,7);
V8:=REF(VOL,8);
V9:=REF(VOL,9);
V10:=REF(VOL,10);
V11:=REF(VOL,11);
V12:=REF(VOL,12);
V13:=REF(VOL,13);
V14:=REF(VOL,14);
V15:=REF(VOL,15);
V16:=REF(VOL,16);
V17:=REF(VOL,17);
V18:=REF(VOL,18);
V19:=REF(VOL,19);
V20:=REF(VOL,20);
V21:=REF(VOL,21);
V22:=REF(VOL,22);
V23:=REF(VOL,23);
V24:=REF(VOL,24);
V25:=REF(VOL,25);
V26:=REF(VOL,26);
V27:=REF(VOL,27);
V28:=REF(VOL,28);
V29:=REF(VOL,29);
V30:=REF(VOL,30);
TDX1:=(C1+C2+C3+C4+C5+C6+C7+C8+C9+C10+C11+C12+C13+C14+C15+C16+C17+C18+C19+C20+C21+C22+C23+C24+C25+C26+C27+C28+C29+C30)/30;
TDX2:=SUM(MAX(0,HIGH-REF(CLOSE,1)),6)/SUM(MAX(0,REF(CLOSE,1)-LOW),6)*100;
TDX3:=EMA(EMA(EMA(CLOSE,3),3),3);
TDX4:=EMA(CLOSE,5);
TDX5:=EMA(CLOSE,12);
TDX6:=EMA(CLOSE,30);
TDX7:=EMA(VOL,5);
TDX8:=EMA(VOL,10);
TDX9:=EMA(VOL,20);
TDX10:=EMA(VOL,60);
TDX11:=EMA(VOL,120);
TDX12:=EMA(VOL,250);
COND1:=TDX1>MA250 AND MA250>MA120 AND MA120>MA60 AND MA60>MA30 AND MA30>MA20 AND MA20>MA10 AND MA10>MA5;
COND2:=TDX2>120 AND TDX2<300;
COND3:=C>MA5 AND C>MA10 AND C>MA20 AND C>MA30 AND C>MA60 AND C>MA120 AND C>MA250;
COND4:=TDX3>TDX4 AND TDX4>TDX5 AND TDX5>TDX6;
COND5:=V>1.5*TDX7 AND V>1.5*TDX8 AND V>1.5*TDX9 AND V>1.5*TDX10 AND V>1.5*TDX11 AND V>1.5*TDX12;
COND6:=HHV(HIGH,20)-C<HHV(HIGH,20)*0.1;
COND7:=REF(C,1)<REF(MA5,1) AND C>MA5;
COND8:=REF(C,1)<REF(MA10,1) AND C>MA10;
COND9:=REF(C,1)<REF(MA20,1) AND C>MA20;
COND10:=REF(C,1)<REF(MA30,1) AND C>MA30;
COND11:=REF(C,1)<REF(MA60,1) AND C>MA60;
COND12:=REF(C,1)<REF(MA120,1) AND C>MA120;
COND13:=REF(C,1)<REF(MA250,1) AND C>MA250;
COND14:=V<V1 AND V1<V2 AND V2<V3 AND V3<V4 AND V4<V5 AND V5<V6 AND V6<V7 AND V7<V8 AND V8<V9 AND V9<V10 AND V10<V11 AND V11<V12 AND V12<V13 AND V13<V14 AND V14<V15 AND V15<V16 AND V16<V17 AND V17<V18 AND V18<V19 AND V19<V20 AND V20<V21 AND V21<V22 AND V22<V23 AND V23<V24 AND V24<V25 AND V25<V26 AND V26<V27 AND V27<V28 AND V28<V29 AND V29<V30;
COND15:=REF(C,1)>REF(MA5,1) AND C<MA5;
COND16:=REF(C,1)>REF(MA10,1) AND C<MA10;
COND17:=REF(C,1)>REF(MA20,1) AND C<MA20;
COND18:=REF(C,1)>REF(MA30,1) AND C<MA30;
COND19:=REF(C,1)>REF(MA60,1) AND C<MA60;
COND20:=REF(C,1)>REF(MA120,1) AND C<MA120;
COND21:=REF(C,1)>REF(MA250,1) AND C<MA250;
CROSS(COND1 AND COND2 AND COND3 AND COND4 AND COND5 AND COND6 AND COND7 AND COND8 AND COND9 AND COND10 AND COND11 AND COND12 AND COND13 AND COND14,1) AND CROSS(COND15 AND COND16 AND COND17 AND COND18 AND COND19 AND COND20 AND COND21,1)
其中,涨停板的预警可以使用以下公式:
CROSS((H-L)/(REF(CLOSE,1)-1),3)>0.097 AND C<1.097*REF(CLOSE,1)
注意,在使用以上公式进行股票预警时,需要综合考虑多种因素,如市场情况、板块走势、技术指标等,避免单一指标的误判。
阅读全文