通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信涨停实时预警指标公式
VAR1:=FINANCE(42);
VAR2:=SUM(CLOSE*VOL,VAR1)/SUM(VOL,VAR1);
VAR3:=SUM(HIGH*VOL,VAR1)/SUM(VOL,VAR1);
VAR4:=SUM(LOW*VOL,VAR1)/SUM(VOL,VAR1);
VAR5:=SUM(AMOUNT/100,VAR1)/SUM(VOL,VAR1);
VAR6:=(VAR2+VAR3+VAR4)/3;
现价:CLOSE;
成本:(VAR5+VAR6)/2;
明涨停:CLOSE*1.1,NODRAW,COLORRED;
VAR1:=EMA((CLOSE-LLV(LOW,10))/(HHV(HIGH,25)-LLV(LOW,10))*4,4);
高:"DMI.PDI"(14,6)>33AND"DMI.MDI"(14,6)<10AND"DMI.ADX"(14,6)>40AND"DMI.ADXR"(14,6)>45,STICK;
危险:HHV(VAR1,4)>3.2ORVAR1>2.5AND高,STICK;
可买:IF(高=1ANDHIGH-CLOSE>CLOSE-LOWANDVOL>HHV(VOL,13)*0.4AND(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)<-0.03,-50,0),STICK;
调整:IF(高=0ANDHHV(高,5)>0,-50,0),STICK;
可卖:IF(危险=1ANDHIGH-CLOSE>CLOSE-LOWANDVOL>HHV(VOL,20)/2ANDCLOSE<OPEN*1.01,-75,0),STICK;
卖出:IF(危险=0ANDHHV(危险,3)>0,-100,0),STICK;
排队:IF(可卖=-75,-75,IF(卖出<0,-100,IF(危险>0,100,IF(调整<0,-50,高)))),COLORSTICK;
排队;
猛虎:600*(EMA(CLOSE,3)-EMA(LOW,30))/EMA(LOW,30);风险:EMA(猛虎,7),COLORRED;笼顶:(WINNER(120*C/100)-WINNER(100*C/100))*100,COLORGREEN;笼底:-100*(WINNER(120*C/100)-WINNER(100*C/100))+5,COLORF00FF0;底部区:=猛虎<笼顶AND猛虎<笼底;打压吸筹区:STICKLINE(底部区,猛虎+10,猛虎-10,2,0),COLOR669933;底成:=(CLOSE-MA(CLOSE,28))/MA(CLOSE,28)*100<-23;STICKLINE(底成,笼底+40,笼底-50,3,0),COLOR00FF00;DRAWTEXT(底成,笼底-40,'★:底成'),COLOR00FF00;VARX:=LLV(LOW,75);VARX1:=HHV(HIGH,75);VARX2:=(VARX1-VARX)/100;VARX3:=SMA((CLOSE-VARX)/VARX2,20,1);VARX4:=3*VARX3-2*SMA(VARX3,15,1);VARX5:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;VARX6:=SMA(VARX5,3,1);VARX7:=SMA(VARX6,3,1);DBX:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100;要涨:=(CROSS(DBX,-5.4)AND(8+DBX)*10>=29AND(100-VARX4)>49AND(VARX4>SUM(VARX4,20)/20ANDVARX7>REF(VARX7,1)))*10;STICKLINE(要涨,笼底-10,笼底+50,4,0),COLORBLUE;DRAWTEXT(要涨,笼底+40,'★:要涨'),COLORBLUE;
X:=SYSPARAM(3)-SYSPARAM(2);
DRAWTEXTEX(C>0,1,500,5,'['+STKLABEL+']'+STKNAME+'【可视:'+NUMTOSTR(X,0)+'天】'),Color0077FF,LINETHICK7;
现价:if(DYNAINFO(4)=0,C,DYNAINFO(7)),color0077FF,POINTDOT;
KC:=(2*C+H+L+O)/5;
CB:=SMA(KC,5,1);
Xl:=slope(CB,3)>0;
{实时趋势流向}
动向流:CB,colorFF8DAD;
ma(动向流,30),colorFF1111,LINETHICK4;
ma(动向流,29),colorFF2222,LINETHICK3;
ma(动向流,28),colorFF3333,LINETHICK2;;
ma(动向流,27),colorFF4444;
ma(动向流,26),colorFF5555;
ma(动向流,25),colorFF6666;
ma(动向流,24),colorFF7777;
ma(动向流,23),colorFF8888;
ma(动向流,22),colorFF9999;
ma(动向流,21),colorFFaaaa;
ma(动向流,20),colorFFbbbb,LINETHICK3;
ma(动向流,19),colorFFcccc;
ma(动向流,18),colorFFdddd;
ma(动向流,17),colorFFeeee;
ma(动向流,16),colorffffFF;
ma(动向流,15),colorEEEEFF;
ma(动向流,14),colorddddFF;
ma(动向流,13),colorccccFF;
ma(动向流,12),colorbbbbFF;
ma(动向流,11),coloraaaaFF;
ma(动向流,10),color9999FF,LINETHICK3;
ma(动向流,9),color8888FF;
ma(动向流,8),color7777FF;
ma(动向流,7),color6666FF;
ma(动向流,6),color5555FF;
ma(动向流,5),color4444FF;
ma(动向流,4),color3333FF;
ma(动向流,3),color2222FF;
ma(动向流,2),color1111FF,LINETHICK2;
close,colorblue,linethick0;
var1:=(SMA(HIGH,20,2)*1.05);
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,9,0),colorFF5B00;
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,8,0),colorFF6C00;
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,7,0),colorFF7B00;
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,6,0),colorFF9C00;
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,5,0),colorFFBE00;
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,3.5,0),colorFFCC00;
STICKLINE((OPEN>=CLOSE),CLOSE,OPEN,1.5,0),colorFFFF00;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,9,0),color070084;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,8,0),color0000A3;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,7,0),color0000B7;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,6,0),color0000CD;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,5,0),color0000E9;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,3,0),color0754E9;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,1.5,0),color076EF3;
STICKLINE((CLOSE>=OPEN),CLOSE,OPEN,1,0),color077BF3;
STICKLINE((CLOSE>OPEN),OPEN,LOW,1,0),color0726CA;
STICKLINE((CLOSE>OPEN),CLOSE,HIGH,1,0),color0726CA;
STICKLINE((OPEN>CLOSE),CLOSE,LOW,1,0),colorDE9100;
STICKLINE((OPEN>CLOSE),OPEN,HIGH,1,0),colorDE9100;
STICKLINE(((((CLOSE/OPEN)>1.04)AND(CLOSE<var1))AND((CLOSE-REF(CLOSE,1))>0)),CLOSE,OPEN,9,0),color0090FF;
STICKLINE(((((CLOSE/OPEN)>1.04)AND(CLOSE<var1))AND((CLOSE-REF(CLOSE,1))>0)),CLOSE,OPEN,8,0),color009FFF;
STICKLINE(((((CLOSE/OPEN)>1.04)AND(CLOSE<var1))AND((CLOSE-REF(CLOSE,1))>0)),CLOSE,OPEN,4,0),color00B5FF;
STICKLINE(((((CLOSE/OPEN)>1.04)AND(CLOSE<var1))AND((CLOSE-REF(CLOSE,1))>0)),CLOSE,OPEN,2,0),color00E4FF;
STICKLINE(((((CLOSE/OPEN)>1.04)AND(CLOSE<var1))AND((CLOSE-REF(CLOSE,1))>0)),OPEN,LOW,0.7,0),color00FFFF;
STICKLINE(((((CLOSE/OPEN)>1.04)AND(CLOSE<var1))AND((CLOSE-REF(CLOSE,1))>0)),CLOSE,HIGH,0.7,0),color00FFFF;
STICKLINE(((((CLOSE<REF(CLOSE,1))AND(CLOSE<REF(CLOSE,1)))AND(HIGH>var1))AND(CLOSE<var1)),OPEN,LOW,0.7,0),colorFF76FF;
STICKLINE(((((CLOSE<REF(CLOSE,1))AND(CLOSE<REF(CLOSE,1)))AND(HIGH>var1))AND(CLOSE<var1)),CLOSE,HIGH,0.7,0),colorFF76FF;
STICKLINE(((((CLOSE<REF(CLOSE,1))AND(CLOSE<REF(CLOSE,1)))AND(HIGH>var1))AND(CLOSE<var1)),CLOSE,OPEN,9,0),colorFF00FF;
STICKLINE(((((CLOSE<REF(CLOSE,1))AND(CLOSE<REF(CLOSE,1)))AND(HIGH>var1))AND(CLOSE<var1)),CLOSE,OPEN,6,0),colorFF62FF;
STICKLINE(((((CLOSE<REF(CLOSE,1))AND(CLOSE<REF(CLOSE,1)))AND(HIGH>var1))AND(CLOSE<var1)),CLOSE,OPEN,4,0),colorFF76FF;
STICKLINE(((((CLOSE<REF(CLOSE,1))AND(CLOSE<REF(CLOSE,1)))AND(HIGH>var1))AND(CLOSE<var1)),CLOSE,OPEN,2,0),colorFFA8FF;
STICKLINE(l>ref(h,1),l,ref(h,1),50,1),COLORRED;
STICKLINE(h<ref(l,1),h,ref(l,1),50,1),colorgreen;
PARTLINE(Xl-1,CB),COLORGREEN,LINETHICK3;
PARTLINE(Xl,CB),COLORRED,LINETHICK3;
VAR0:=IF((CURRBARSCOUNT=1)AND(PERIOD=5),(VOL*240)/FROMOPEN,DRAWNULL);
VAR1:=(VOL>=(REF(VOL,1)*1.9))AND(C>REF(C,1));
VAR2:=VOL<REF(LLV(VOL,60),1);
VAR3:=(((ABS(VOL-HHV(REF(VOL,1),5)))/HHV(REF(VOL,1),5))<=0.03)OR(((ABS(VOL-REF(VOL,1)))/REF(VOL,1))<=0.03);
VAR4:=VOL<=(REF(VOL,1)*0.5);
VAR5:=(SUM(VOL,7)/SUM(VOL,14))>0.65;
VOLUME:VOL,VOLSTICK;
STICKLINE((CURRBARSCOUNT=1)AND(PERIOD=5),VAR0,0,-1,-1),COLOR00C0C0;
VOLUME3:VOL,VOLSTICK;
STICKLINE(VAR1,0,VOL,0.5,0),COLORYELLOW;
STICKLINE(VAR2,0,VOL,1,0),COLORMAGENTA;
STICKLINE(VAR5,0,VOL,2,0),COLORRED;
DRAWICON((COUNT(VAR5,5)>=1)AND((C/REF(C,1))>=1.095),-10000,5);
涨停板:MA(VOL,5);
MV1:MA(VOL,10),COLORMAGENTA;
[源码注释]通达信公式动态翻译结果
ZTB赋值:如果模糊匹配品种名称ORNAMELIKE('*ST')ORNAMELIKE('SST')ORNAMELIKE('S*ST')ORNAMELIKE('SST'),返回(收盘价>=计算涨停价ANDC=最高价),否则返回如果(模糊匹配品种代码OR(模糊匹配品种代码ANDDATE>=1200824)),返回(收盘价>=计算涨停价ANDC=最高价),否则返回(收盘价>=计算涨停价ANDC=最高价)
输出XG:ZTB AND 最低价<最高价
每日通达信公式解答:
编写条件:
30日内从最高点到现在跌幅大于50%选股公式。
编写方法:
XG:(C/HHV(H,30)-1)*100<-50;
评论(0)