通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信涨停预警指标公式
P1:=60;P2:=5;P3:=10;
REFLINE:0;
K1:=IF(CLOSE>=REF(CLOSE,1),HIGH-OPEN+CLOSE-LOW+CLOSE-REF(CLOSE,1),HIGH-OPEN+CLOSE-LOW);
K2:=IF(CLOSE<=REF(CLOSE,1),OPEN-LOW+HIGH-CLOSE+REF(CLOSE,1)-CLOSE,OPEN-LOW+HIGH-CLOSE);
DT:=VOL*K1/(K1+K2);
KT:=VOL-DT;
买量:=SUM(DT,1);
卖量:=SUM(KT,1);
DDX:EMA(买量-卖量,5)*VOL/CAPITAL*100,COLORSTICK,LINETHICK2;
STICKLINE(DDX>0,0,DDX,3,0),COLOR000088;
STICKLINE(DDX>0,0,DDX,2.5,0),COLOR0000AA;
STICKLINE(DDX>0,0,DDX,1.5,0),COLOR0000CC;
STICKLINE(DDX>0,0,DDX,1,0),COLOR0000EE;
STICKLINE(DDX<0,0,DDX,3,0),COLOR008800;
STICKLINE(DDX<0,0,DDX,2.5,0),COLOR00AA00;
STICKLINE(DDX<0,0,DDX,1.5,0),COLOR00CC00;
STICKLINE(DDX<0,0,DDX,1,0),COLOR00EE00;
DDX1:SMA(DDX,3,1),COLORFFFFFF;
DDX2:SMA(DDX1,3,1),COLOR00FFFF;
DDX3:EMA(DDX2,5),COLORFF00FF;
预警:DDX>0ANDMA(V,5)>MA(MA(V,5),5)ANDCROSS(DDX1,DDX2),LINETHICK;
天:=COUNT(DDX>0,5),COLORRED;
DRAWTEXT(预警,DDX*1.06,'★'),LINETHICK3,COLOR00FFFF;
a1:=(VOL/CLOSE)/2;
a2:=SUM((IF(((a1>100)AND(CLOSE>(REF(CLOSE,1)))),a1,0)),0);
a3:=SUM((IF(((a1>100)AND(CLOSE<(REF(CLOSE,1)))),a1,0)),0);
a4:=SUM((IF(((a1<100)and(close>(REF(CLOSE,1)))),a1,0)),0);
a5:=SUM((IF(((a1<100)AND(CLOSE<(REF(CLOSE,1)))),a1,0)),0);
火箭动力:(a2),linethick2,ColorFF55FF;
火箭燃料:a4-a5,COLORSTICK;
收益:FINANCE2(3);
净资产:FINANCE2(4);
流通:FINANCE2(37)/10000,colorRed;
STICKLINE((火箭燃料>0),火箭燃料,0,7,0),colorRed;
STICKLINE((火箭燃料<0),火箭燃料,0,7,0),colorCyan;
PARTLINE(火箭动力,(a2>a3)AND(a2>500),RGB(255,0,0),a2<a3,RGB(0,255,0),1,RGB(0,0,255)),linethick4;
DRAWTEXTREL(0,0,BKNAME),ColorCCFFFF;
DRAWTEXT(BARSLAST(DATE>=时间),L*0.94,'换手起点'),COLORRED;
DRAWICON(BARSLAST(DATE>=时间),L*0.98,1);
HSL:100*VOL/(capital),linethick0;
上市日期:(FINANCE2(2)-19000000),linethick0;
{天数:BARSLAST(DATE<=1140101);
累积换手:=SUM(HSL,5);}
HS100:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=100,0),linethick0;
HS200:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=200,0),linethick0;
HS300:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=300,0),linethick0;
HS400:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=400,0),linethick0;
HS500:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=500,0),linethick0;
HS600:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=600,0),linethick0;
HS700:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=700,0),linethick0;
HS800:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=800,0),linethick0;
HS900:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=900,0),linethick0;
HS1000:IF(DATE>=时间,SUM(HSL,if(上市日期<=时间,BARSLAST(DATE<=时间),0))>=1000,0),linethick0;
DRAWTEXT(CROSS(HS100,0.99),L*0.94,'换100'),COLORYELLOW;
DRAWICON(CROSS(HS100,0.99),L*0.98,1);
DRAWTEXT(CROSS(HS200,0.99),L*0.94,'换200'),COLORGREEN;
DRAWICON(CROSS(HS200,0.99),L*0.98,1);
DRAWTEXT(CROSS(HS300,0.99),L*0.94,'换300'),COLORWHITE;
DRAWICON(CROSS(HS300,0.99),L*0.98,1);
DRAWTEXT(CROSS(HS400,0.99),L*0.97,'换400'),COLORWHITE;
DRAWTEXT(CROSS(HS500,0.99),L*0.97,'换500'),COLORWHITE;
DRAWTEXT(CROSS(HS600,0.99),L*0.97,'换600'),COLORWHITE;
DRAWTEXT(CROSS(HS700,0.99),L*0.97,'换700'),COLORWHITE;
DRAWTEXT(CROSS(HS800,0.99),L*0.97,'换800'),COLORWHITE;
DRAWTEXT(CROSS(HS900,0.99),L*0.97,'换900'),COLORWHITE;
DRAWTEXT(CROSS(HS1000,0.99),L*0.97,'换1000'),COLORWHITE;
X1:=STRFIND(BKNAME,'自选股,',1);x2:=STRFIND(BKNAME,'自选股1底部,',1);
x3:=STRFIND(BKNAME,'自选股2平台,',1);x4:=STRFIND(BKNAME,'自选股A绩优,',1);
x5:=STRFIND(BKNAME,'自选股B绩优增仓,',1);
x:=max(1,x1,x2,x3,x4,x5);
x1:=if(x=x1,7,if(x=x2orx=x3orx=x4,12,if(x=x5,16,0)));
{BK1:=STRMID(BKNAME,x+x1,8);X6:=if(STRFIND(BK1,',',1)<>0,STRFIND(BK1,',',1),9);
BK:=STRMID(BKNAME,x+x1,x6-1);}
BK:=STRMID(BKNAME,x+x1,200);
DRAWTEXTABS(0,10,'板块名称:'+BK),Color9DFFFF;
D1:=(L+H+C*2)/4;
D2:=MA(D1,4);
D3:=HHV(D2,10);
D4:=MA(D3,3);
D5:=1.25*D4-0.25*D3;
A:=IF(D5>D3,D3,D5);
F1:=LLV(D2,10);
F2:=MA(F1,3);F3:=1.25*F2-0.25*F1;
B:=IF(F3<F1,F1,F3);
MA13:=MA(C,13);
DOU:=CROSS(C,B)ANDCROSS(C,MA13)ANDCROSS(C,A);
DOUDOU:=CROSS(C,MA13)ANDCROSS(C,A);
大宝马:DOUORDOUDOU;
[源码注释]通达信公式动态翻译结果
BOLL赋值:收盘价的20日简单移动平均
UB赋值:BOLL+2*收盘价的20日估算标准差
LB赋值:BOLL-2*收盘价的20日估算标准差
输出XG:1日前的收盘价>1日前的UB
每日通达信公式解答:
选股公式源码
LC:=REF(CLOSE,1);
RS:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
抄底十拿九稳:REF(RS,2)<REF(RS,3)ANDREF(RS,1)REF(RS,1),COLORLIMAGENTA,LINETHICK3;
选股公式翻译
LC赋值:1日前的收盘价
RS赋值:收盘价-LC和0的较大值的6日[1日权重]移动平均/收盘价-LC的绝对值的6日[1日权重]移动平均*100
输出抄底十拿九稳:2日前的RS<3日前的RSAND1日前的RS<2日前的rsandrs>1日前的RS,画淡洋红色,线宽为3
评论(0)