通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信倍量底分型选股指标公式
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
{倍量柱}
VVOL:IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
AA:=VOL>REF(V,1)*1.9;{倍量}
{BUYHAOGU}
AA1:=V/REF(V,1)<=0.6;{缩倍量}
STICKLINE(AA,0,V,2,0),COLORYELLOW;
STICKLINE(AA1,0,V,2,0),COLOR1D7300;
MV5:MA(V,5)COLORYELLOW;
MV35:MA(V,35)COLORMAGENTA;{启动}
MV135:MA(V,135)COLOR1D7300;{异动}
DRAWICON(CROSS(MV5,MV135),MV5,1);{5日上穿135日做记号};
VAR1:=REF(CLOSE,2);
趋势线:SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100,LINETHICK2,COLORLIBLUE;
VAR2:=REF(CLOSE,1);
VAR3:=SMA(MAX(CLOSE-VAR2,0),7,1)/SMA(ABS(CLOSE-VAR2),7,1)*100;
逢高派发:STICKLINE(趋势线>85,78,85,1.2,0),COLORYELLOW;
极高风险:STICKLINE(趋势线>90,78,85,1.8,0),COLORRED;
DRAWICON(趋势线>95,100,2);
吸:=IF(趋势线<12,23,12),COLORWHITE,LINETHICK2;
强买:=IF(VAR3<12,30,12),COLORMAGENTA,LINETHICK2;
{轻仓大底}
长期线:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19)+100,COLOR9900FF,LINETHICK3;
短期线:=-100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6))+100,COLORRED;
中期线:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100,COLORYELLOW,LINETHICK2;
STICKLINE(中期线<12,23,12,2,0),COLORYELLOW;
STICKLINE(长期线<12,23,12,2,0),COLORRED;
{强势拉升}
上趋势:=MA(LOW,20)*1.2,COLOR0080FF,LINETHICK2;
次上趋势:=MA(LOW,20)*1.1,COLORYELLOW;
次下趋势:=MA(HIGH,20)*0.9,COLORWHITE;
下趋势:=MA(HIGH,20)*0.8,COLORGREEN,LINETHICK1;
ZD:=(C-REF(C,1))/REF(C,1)*100;
HDZF:=(HHV(H,20)-C)/(HHV(H,20)-LLV(L,20));
趋势强度:=IF(C>次上趋势,IF(C>上趋势,4,3),IF(C>次下趋势ANDC<次上趋势,2,IF(C<下趋势,0,1))),NODRAW;
底距:=(C-下趋势)/下趋势*100,NODRAW;
{一目了然}
MA多:=SMA(MAX(C-REF(C,1),0),8,1)/SMA(ABS(C-REF(C,1)),8,1)*100,COLORFFB5FF,LINETHICK2;
多方:EMA(MA多,5),COLORYELLOW,LINETHICK2;
XX:=IF(多方<45,多方,DRAWNULL),COLORGREEN,LINETHICK3;
三成:=IF(多方<25AND多方>=20,50,25),COLORWHITE,LINETHICK2;
六成:=IF(多方<20AND多方>=15,35,25),COLORLIRED,LINETHICK3;
全仓:IF(多方<15,37,25),COLORRED,LINETHICK5;
STICKLINE(多方>75,68,60,1.2,0),COLORYELLOW;
STICKLINE(多方>80,68,60,1.2,0),COLORRED;
DRAWICON(多方>85,55,2);
{砸锅卖田}
趋线:(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100,COLORAABBDD,NODRAW;
AA:=((REF(趋线,1)<REF(趋线,2)AND趋线<-30)AND趋线>=REF(趋线,1))OR(REF(CROSS(-30,趋线),1)ANDCROSS(趋线,-30))OR趋线=-30;
卖田:=IF(AA,65,12),COLORYELLOW,LINETHICK2;
BB:=((REF(趋线,1)<REF(趋线,2)AND趋线<-20AND趋线>-25)AND趋线>=REF(趋线,1))OR(REF(CROSS(-20,趋线),1)ANDCROSS(趋线,-20));
见底:=IF(BB,58,12),COLORRED,LINETHICK2;
CC:=((REF(趋线,1)<REF(趋线,2)AND趋线<-25AND趋线>-30)AND趋线>=REF(趋线,1))OR(REF(CROSS(-25,趋线),1)ANDCROSS(趋线,-25));
浅底:IF(趋线<-20,60,12),LINETHICK3,COLORF0F000;
DRAWTEXT(CROSS(-20,趋线),80,'浅底'),COLORF0F000;
IF(趋线<-25,80,12),LINETHICK2,COLORF00FF0;
DRAWTEXT(CROSS(-25,趋线),90,'深底'),COLORF00FF0;
IF(趋线<-30,35,12),LINETHICK4,COLORWHITE;
DRAWTEXT(CROSS(-30,趋线),55,'砸锅'),COLORGRAY;
{走势铁底}
M:=88;
N1:=6;
VAR0A:=EMA(EMA(EMA(CLOSE,2),2),2);
MA13:=(MA(VAR0A,13)*0.99),LINETHICK2;
KK:=(MA(VAR0A,13)*0.999);
TLAMSENR:=MAX(MAX((HIGH-LOW),ABS((REF(CLOSE,1)-HIGH))),ABS((REF(CLOSE,1)-LOW)));
ATR:=MA(TLAMSENR,13);VAR1A:=(REF(CLOSE,1)-REF(ATR,1));
生命:=(HHV(VAR1A,12)),LINETHICK4,COLOR0080FF;
VARX1:=EMA(AMOUNT/VOL/100,3);
控盘成本:=EMA(VARX1,M),LINETHICK2;
低吸伏击:=EMA(VARX1,M)*0.85,LINETHICK2,COLORFFFF00;
走势铁底:=低吸伏击*0.87,LINETHICK3,COLORFF00FF;
距底:=(C-低吸伏击)/低吸伏击*100,NODRAW;
机会:IF(趋势强度<=1AND中期线<12AND距底>0AND距底<5,55,25),COLORGREEN,LINETHICK2;
低吸:IF(C<低吸伏击AND中期线<12AND趋势强度=1,58,25),COLORYELLOW,LINETHICK3;
伏击:IF(L<走势铁底,66,25),COLORLIRED,LINETHICK3;
{俊俊建仓}
VARZ1:=1;
VARZ2:=REF(LOW,1)*VARZ1;
VARZ3:=SMA(ABS(LOW-VARZ2),3,1)/SMA(MAX(LOW-VARZ2,0),3,1)*100*VARZ1;
VARZ4:=(2*C+H+L)/4;
VARZ5:=LLV(LOW,60);
VARZ6:=(2*CLOSE+HIGH+LOW)/4;
VARZ8:=LLV(LOW,34);
VARZ11:=HHV(HIGH,34);
VARZ12:=EMA((VARZ6-VARZ8)/(VARZ11-VARZ8)*100,13);
VARZ13:=EMA(0.667*REF(VARZ12,1)+0.333*VARZ12,2);
VARZ0:=HHV(HIGH,60);
AAA:=EMA((VARZ4-VARZ5)/(VARZ0-VARZ5)*100,5);
BBB:=EMA(AAA,5);
上线:=IF(AAA>=BBB,100,100),COLOR00FF00,LINETHICK3;
下线:=IF(AAA<BBB,0,0),COLOR00FFCC,LINETHICK3;
中线:=IF(AAA<BBB,50,50),LINETHICK1,COLOR0033FF;
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
趋势:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA
(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
DDK:=DRAWICON(趋势<=3AND趋势强度<=1,63,1);
{临界点}
C1:=((MA(C,30)-L)/MA(C,60))*200;
临界点:=IF(C1>30,68,45),LINETHICK3,COLORRED;
{主力进场:下方红绿柱}
VR2:=REF(LOW,1);
VR3:=SMA(ABS(LOW-VR2),3,1)/SMA(MAX(LOW-VR2,0),3,1)*100;
VR4:=EMA(IF(CLOSE*1.3,VR3*10,VR3/10),3);
VR5:=LLV(LOW,30);
VR6:=HHV(VR4,30);
VR7:=IF(MA(CLOSE,58),1,0);
主力:=EMA(IF(LOW<=VR5,(VR4+VR6*2)/2,0),3)/618*VR7,COLORMAGENTA,NODRAW;
VR9:=IF(主力>100,100,主力);
主力进场:=STICKLINE(VR9>0,0,VR9,3,0),COLORMAGENTA;
洗:=STICKLINE(主力<REF(主力,1),0,VR9,3,0),COLORGREEN;
盘:=STICKLINE(VR9<REF(VR9,1),0,VR9,3,0),COLORGREEN;
{超级短底}
短底:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+
(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3,NODRAW;
炒短:=IF(短底<-10AND主力>REF(主力,1),60,12),COLORLIRED,LINETHICK2;
{成本线}
VBR1:=IF(DATE>=10201201,0,1);
VBR2:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
VBR3:=EMA(CLOSE,3);
VBR4:=(2*CLOSE+LOW+HIGH)/4*VBR1;
VBR5:=VBR2-VBR3;
风险线:=EMA(VBR4,45)*1.15;
必卖线:=EMA(VBR4,55)*1.3,COLORRED;
底线:=EMA(VBR4,40)*0.85,COLORWHITE,LINETHICK2;
铁底线:=EMA(VBR4,88)*0.7,COLORRED;
成本线:=EMA(VBR4,55),COLORGREEN,LINETHICK2;
价值中枢:=(成本线+底线)/2,COLORFFFF00;
铁底:IF(C<铁底线AND炒短,73,25),COLORBLUE,LINETHICK3;
大底天:BARSLAST(CROSS(12,长期线)),NODRAW;
85,POINTDOT;
70,POINTDOT;
75,COLORGREEN;
中枢:45,COLORRED,LINETHICK2;
25,COLORGREEN,LINETHICK2;
30,COLORLIRED;
A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
HJX21:=(21*A+20*REF(A,1)+19*REF(A,2)+18*REF(A,3)+17*REF(A,4)+16*REF(A,5)+
15*REF(A,6)+14*REF(A,7)+13*REF(A,8)+12*REF(A,9)+11*REF(A,10)+
10*REF(A,11)+9*REF(A,12)+8*REF(A,13)+7*REF(A,14)+6*REF(A,15)+
5*REF(A,16)+4*REF(A,17)+3*REF(A,18)+2*REF(A,19)+
REF(A,21))/231;
VOL:=IF(CURRBARSCOUNT=1ANDPERIODNAME=5,V*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1ANDPERIODNAME=5,VVOL,0,-1,-1),COLOR00C0C0;
成交:=VOL,POINTDOT;
MA100:MA(V,100),colorgreen;
总手:V,VOLSTICK;
倍量:(V/REF(V,1)>=1.99ANDCOUNT(C>O,10))OR(L>REF(H,1)ANDCOUNT(O>C,1)ANDV/REF(V,1)>=-4),
NODRAW,coloryellow;
DRAWTEXT(倍量,V*1.3,'倍'),coloryellow;
HJX3:=(3*A+2*REF(A,1)+REF(A,2))/6;
DC1:=EMA(HJX3,4);
DC2:=EMA(DC1,3);
DC3:=EMA(DC1,7);
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);
BB:=REF(CLOSE,12);
CC:=SMA(MAX(CLOSE-BB,0),2,1)/SMA(ABS(CLOSE-BB),2,1)*100;
CCC:=MACD>REF(MACD,1)ANDMACD>0;
买点:CROSS(C,DC1)ANDCROSS(C,DC2)ANDCROSS(C,DC3)ANDCCCANDCC<50;
[源码注释]通达信公式动态翻译结果
HJ_1赋值:成交量(手)*收盘价*100
HJ_2赋值:5
HJ_3赋值:7
HJ_4赋值:6
HJ_5赋值:HJ_1的1日累和/(成交量(手)的1日累和*100)
HJ_6赋值:HJ_5的HJ_2日指数移动平均
主流资金赋值:(HJ_5-HJ_6)*100/HJ_5
HJ_10赋值:如果(收盘价-1日前的收盘价)/1日前的收盘价*100>=9.9ANDCLOSE=开盘价,返回1,否则返回0
HJ_11赋值:主流资金>=HJ_3日内1日前的主流资金的最高值
HJ_12赋值:收盘价的HJ_4日简单移动平均>1日前的收盘价的HJ_4日简单移动平均
HJ_13赋值:如果主流资金>0ANDHJ_11>0ANDHJ_10=0ANDHJ_12,返回1,否则返回0
HJ_14赋值:信号过滤(多头)
XA_5赋值:主流资金>=15日内1日前的主流资金的最高值
XA_6赋值:信号过滤(多头)
输出资金流:HJ_14>0 AND XA_6>0
当满足条件是否最后一个周期时,在横轴0纵轴0.05位置书写文字
输出趋势线: 3*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均-2*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均的3日[1日权重]移动平均,画蓝色
输出见底信号: 10,画红色
输出买点准备: 如果趋势线<=10,返回50,否则返回0,画绿色
输出买入时间: 如果趋势线上穿见底信号,返回100,否则返回0,画黄色
当满足条件收阳线时,在横轴0.01纵轴0.9位置书写文字,COLOR556699
M1赋值:(收盘价,10)
VAR1赋值:1
VAR2赋值:如果月份<12,返回1,否则返回100000
VAR3赋值:(2*收盘价+最高价+最低价)/4
VAR4赋值:34日内最低价的最低值
VAR5赋值:34日内最高价的最高值
输出趋势: (VAR3-VAR4)/(VAR5-VAR4)*100的13日指数移动平均,线宽为2,画红色
输出人气: 0.667*1日前的趋势+0.333*趋势的2日指数移动平均,线宽为2,画黄色
输出分界: 50*VAR1,画白色
当满足条件趋势上穿30AND人气<趋势时,在30位置书写文字,画黄色
当满足条件趋势上穿60AND人气<趋势时,在60位置书写文字,画红色
当满足条件趋势上穿80AND人气<趋势时,在80位置书写文字,画洋红色
当满足条件人气上穿趋势AND人气>80时,在80位置书写文字,画绿色
输出低吸: 如果趋势上穿人气AND趋势<15,返回20,否则返回0,画红色
输出高抛: 如果人气上穿趋势AND人气>85,返回80,否则返回100,画绿色
每日通达信公式解答:
编写条件:
开盘涨幅、换手率、量比都是5%的预警公式。
编写方法:
O/REF(C,1)>-1.05&&HSL>=5&&DYNAINFO(17)>=5;
评论(0)