通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信十天内有涨停的选股指标公式
VAR2T:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));VAR3T:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));涨幅:=(C-REF(C,1))/REF(C,1)*100;VARA:=C>REF(C,1)ANDC>REF(C,2);VARB:=C<REF(C,1)ANDC<REF(C,2);VAR1:=REF(VARB,1)ANDC>=REF(C,1)ANDC<=REF(C,2);VAR2:=REF(VAR1,1)ANDC<=REF(C,1)ANDC>=REF(C,2);VAR3:=REF(VAR2,1)ANDC>=REF(C,1)ANDC<=REF(C,2);VAR4:=REF(VAR3,1)ANDC<=REF(C,1)ANDC>=REF(C,2);VAR5:=REF(VAR4,1)ANDC>=REF(C,1)ANDC<=REF(C,2);VAR6:=REF(VAR5,1)ANDC<=REF(C,1)ANDC>=REF(C,2);VAR7:=REF(VAR6,1)ANDC>=REF(C,1)ANDC<=REF(C,2);VAR8:=REF(VAR7,1)ANDC<=REF(C,1)ANDC>=REF(C,2);VAR9:=REF(VAR8,1)ANDC>=REF(C,1)ANDC<=REF(C,2);VAR10:=REF(VAR9,1)ANDC<=REF(C,1)ANDC>=REF(C,2);VAR11:=REF(VAR10,1)ANDC>=REF(C,1)ANDC<=REF(C,2);JIN:=VARBORVAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVAR10ORVAR11;宝塔线转阳信号:=VARAANDREF(JIN,1);MID:=REF(HIGH+LOW,1)/2;CR:=SUM(MAX(0,HIGH-MID),26)/SUM(MAX(0,MID-LOW),26)*100;出手就赢:CROSS(VAR2T,MA(VAR3T,6))AND宝塔线转阳信号ANDCR>REF(CR,1)AND涨幅>5;
DRAWGBKLAST(C>0,STRIP(RGB(0,0,20),RGB(0,0,20),0));
BEGINDRAWTEXTREL(0,0,'所属板块:'+BKNAME),LINETHICK1,COLORFFFFFF;end;
SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);
DRAWTEXTREL(700,40,'量能饱和度:'+NUMTOSTRN(SAT,0)),LINETHICK2,Color00FFFF;
DRAWRECTREL(860,20,695,250,RGB(0,0,50));
DRAWTEXT(vol=HHV(vol,20),C,B1),color00FFCC;
STICKLINE(V>=HHV(V,62),OPEN,CLOSE,1,0),COLOR00FFFF;
十天买卖:REF(CLOSE,1),COLOR0000FF,LINETHICK1;
PARTLINE(十天买卖,CLOSE>=十天买卖,RGB(255,0,0)),LINETHICK5;
十天压力:HHV(十天买卖,13),COLOR00FF00,LINETHICK1;
PARTLINE(十天压力,十天买卖>=十天压力,RGB(255,255,0)),LINETHICK4;
十天支撑:LLV(十天买卖,13),Color00FFFF,LINETHICK1;
PARTLINE(十天支撑,十天买卖>=十天支撑,RGB(0,255,0)),LINETHICK4;
{RSV:=(((CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13)))*100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=((3*K)-(2*D));
RSV24:=(((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55)))*100);
K24:=SMA(RSV24,3,1);
D24:=SMA(K24,3,1);
J24:=((3*K24)-(2*D24));
压力位:IF(CROSS(J24,J),HIGH,REF(HIGH,BARSLAST(CROSS(J24,J)))),colorFF00FF,LINETHICK2;
支撑位:IF(CROSS(J,J24),LOW,REF(LOW,BARSLAST(CROSS(J,J24)))),colorFFFFFF;}
价在线下:=C<十天买卖;
STICKLINE(价在线下,CLOSE,OPEN,7.5,0),COLORff7700;
STICKLINE(价在线下,CLOSE,OPEN,6,0),COLORff9900;
STICKLINE(价在线下,CLOSE,OPEN,5,0),COLORffbb00;
STICKLINE(价在线下,CLOSE,OPEN,4,0),COLORffcc00;
STICKLINE(价在线下,CLOSE,OPEN,3,0),COLORffdd00;
STICKLINE(价在线下,CLOSE,OPEN,2,0),COLORffee00;
STICKLINE(价在线下,CLOSE,OPEN,1,0),COLORffff00;
价在线上:=C>=十天买卖;
STICKLINE(价在线上,CLOSE,OPEN,7.5,0),COLOR000055;
STICKLINE(价在线上,CLOSE,OPEN,6,0),COLOR000066;
STICKLINE(价在线上,CLOSE,OPEN,5,0),COLOR000077;
STICKLINE(价在线上,CLOSE,OPEN,4,0),COLOR000099;
STICKLINE(价在线上,CLOSE,OPEN,3,0),COLOR0000bb;
STICKLINE(价在线上,CLOSE,OPEN,2,0),COLOR0000dd;
STICKLINE(价在线上,CLOSE,OPEN,1,0),COLOR0000ff;
收小于开:=C>=十天买卖andc<OPEN;
stickline(收小于开,o,(o+c)/2,7.5,0),colorff11ff;
stickline(收小于开,o,(o+c)/2,6,0),colorff33ff;
stickline(收小于开,o,(o+c)/2,5,0),colorff55ff;
stickline(收小于开,o,(o+c)/2,4,0),colorff77ff;
stickline(收小于开,o,(o+c)/2,3,0),colorff99ff;
stickline(收小于开,o,(o+c)/2,2,0),colorffbbff;
stickline(收小于开,o,(o+c)/2,1,0),colorffddff;
收大于开:=C<十天买卖andc>open;
stickline(收大于开,c,(o+c)/2,7.5,0),color333333;
stickline(收大于开,c,(o+c)/2,6,0),color555555;
stickline(收大于开,c,(o+c)/2,5,0),color777777;
stickline(收大于开,c,(o+c)/2,4,0),color999999;
stickline(收大于开,c,(o+c)/2,3,0),colorbbbbbb;
stickline(收大于开,c,(o+c)/2,2,0),colordddddd;
stickline(收大于开,c,(o+c)/2,1,0),colorffffff;
LL:=LLV(C,100);
TJ:=IF((C-REF(C,1))/REF(C,1)>0.025,1,0);
平台支撑:=IF(C>REF(O,BARSLAST(TJ=1)),REF(O,BARSLAST(TJ=1)),0);
stickline(平台支撑,c,(o+c)/2,7.5,0),color005555;
stickline(平台支撑,c,(o+c)/2,6,0),color006666;
stickline(平台支撑,c,(o+c)/2,5,0),color007777;
stickline(平台支撑,c,(o+c)/2,4,0),color009999;
stickline(平台支撑,c,(o+c)/2,3,0),color00bbbb;
stickline(平台支撑,c,(o+c)/2,2,0),color00dddd;
stickline(平台支撑,c,(o+c)/2,1,0),color00ffff;
平台压力:=IF(ref(OPEN,1),ref(close,1),0);
stickline(平台压力,o,(o+c)/2,7.5,0),color003300;
stickline(平台压力,o,(o+c)/2,6,0),color005500;
stickline(平台压力,o,(o+c)/2,5,0),color007700;
stickline(平台压力,o,(o+c)/2,4,0),color009900;
stickline(平台压力,o,(o+c)/2,3,0),color00bb00;
stickline(平台压力,o,(o+c)/2,2,0),color00dd00;
stickline(平台压力,o,(o+c)/2,1,0),color00ff00;
Var1:=LLV(LOW,36);
Var2:=HHV(HIGH,20);
散户:=MA(WINNER(CLOSE*0.95)*100,3);
游资:=EMA((CLOSE-Var1)/(Var2-Var1)*4,4)*25;
DRAWTEXT(cross(游资,ref(游资,1)),L*0.93,'进'),ALIGN1,COLOR00FFFF;
DRAWTEXT(cross(游资,ref(游资,1)),L*0.89,'场'),ALIGN1,COLOR00FFFF;
DRAWTEXT(cross(ref(游资,1),游资),H*1.14,'减'),ALIGN1,COLOR00FF00;
DRAWTEXT(cross(ref(游资,1),游资),H*1.1,'仓'),ALIGN1,COLOR00FF00;
DRAWICON(cross(游资,ref(游资,1)),L*0.93,7),ALIGN1,VALIGN2;
DRAWICON(cross(ref(游资,1),游资),H*1.02,8),ALIGN1,VALIGN2;
DRAWICON(cross(散户,ref(散户,1)),L*0.90,7),ALIGN1,VALIGN2;
DRAWICON(cross(ref(散户,1),散户),H*1.04,8),ALIGN1,VALIGN2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);第二波选股:COUNT(C/REF(C,1)>=1.09925,20)>=1ANDREF(K,1)<16ANDK>=REF(K,1),COLORRED;
[源码注释]通达信公式动态翻译结果
ZT赋值:如果模糊匹配品种名称ORNAMELIKE('*ST')ORNAMELIKE('SST')ORNAMELIKE('S*ST')ORNAMELIKE('SST'),返回(收盘价>=计算涨停价ANDC=最高价),否则返回如果(模糊匹配品种代码OR(模糊匹配品种代码ANDDATE>=1200824)),返回(收盘价>=计算涨停价ANDC=最高价),否则返回(收盘价>=计算涨停价ANDC=最高价)
输出XG:条件连续成立次数>=3 AND ZT
每日通达信公式解答:
编写要求:
50天内股票的最高价,达到价格的90%以上的选股公式。
解答:
C>REF(HHV(H,50),1)*0.9;
评论(0)