通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信一阳穿三线涨停副图指标公式
A1:=REF(C,1)/REF(O,1)>1.03ANDREF(C,1)>REF(O,1)ANDREF(H,1)>REF(C,1)ANDREF(L,1)=REF(O,1);
A2:=REF(L,2)/REF(L,1)>1.02ANDL<REF(H,1);
A3:=C>REF(C,1)ANDC>ma(C,5);
A4:=REF(L,1)=LLV(L,7);
A5:=H>MA(C,5)ANDH>MA(C,10)ANDH>MA(C,20)ANDH>MA(C,60);
XG:A1ANDA2ANDA3ANDA4ANDA5;
XG:C>OANDC>=maX(REF(C,1),REF(O,1))ANDC>=MAX(REF(C,2),REF(O,2))ANDC>=MAX(REF(C,3),REF(O,3))ANDO<=MIN(REF(O,1),REF(C,1))ANDO<=MIN(REF(O,2),REF(C,2))ANDO<=MIN(REF(O,3),REF(C,3));
C>OANDCOUNT(C<O,4)=3ANDC>REF(O,3);
T0:=BArslAst(C/REF(C,3)>=1.12);
T1:=BARSLAST(C/REF(C,3)<=REF(C/REF(C,3),1));
A0:=REF(HHV(H,2),T0);
A1:=COUNT(H<=A0,T0+1)=T0+1ANDA0=REF(A0,1);
B0:=REF(LLV(L,T1+1),T0);
B1:=COUNT(L>=B0,T0+1)=T0+1ANDB0=REF(B0,1);
C0:=A1ANDB1ANDT0>=13ANDT0<=20;
十八飙:REF(C0,1)ANDC/REF(A0,1)>=1.03ANDC/REF(C,1)>=1.05ANDV/CAPITAL>=0.05;
三线:C>Ref(C,1)andcross(C,ma(C,5))andCross(C,Ma(C,10))and
Cross(C,Ma(C,20)),colorgreen;
四线:C>Ref(C,1)andCross(C,Ma(C,5))and
Cross(C,Ma(C,10))andCross(C,Ma(C,20))andCross(C,Ma(C,30)),coloryellow;
五线:C>Ref(C,1)andCross(C,Ma(C,5))andCross(C,Ma(C,10))and
Cross(C,Ma(C,20))andCross(C,Ma(C,30))andCross(C,Ma(C,40)),colorred;
六线:C>OandCross(C,Ma(C,5))andCross(C,Ma(C,10))andCross(C,Ma(C,20))
andCross(C,Ma(C,30))andCross(C,Ma(C,40))andCross(C,Ma(C,60))and
slope(Ma(C,60),2)>0,colorffff00;
A:MA(CLOSE,26);
UP:A+2*STD(CLOSE,26);
LOWER:A-2*STD(CLOSE,26);
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
均39:MA(CLOSE,39),COLORRED;
均72:MA(CLOSE,72),COLOR00FF00,POINTDOT,LINETHICK4;
红色线上:均39+2*STD(CLOSE,72),COLORYELLOW,POINTDOT,LINETHICK4;
红色线下:均39-2*STD(CLOSE,72),COLORYELLOW,POINTDOT,LINETHICK4;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
CBFB:=COSTEX(C,REF(C,1));
JL:=IF(C>CBFB,V,0);
CL:=IF(C<CBFB,V,0);
JLH:=SUM(JL,4);
CLH:=SUM(CL,4);
LHB:=CLH/JLH;
TJ1:=IF(HHV(LHB,5)>4ANDCROSS(2,LHB)ANDC>=O,1,0);
DRAWICON(TJ1,L*0.98,9);
DS:="MFI.MFI"(12,9);
A9:=DATETODAY(DATE);
DS1:=IF(A9>7399{20110324},0,-DS);
AJ2:=A9>146ANDA9<200;
AI2:=A9>696ANDA9<750;
AH2:=A9>1315ANDA9<1365;
AA2:=A9>1854ANDA9<1904;
AL2:=A9>3068ANDA9<3118;
AK2:=A9>4709ANDA9<4759;
AB2:=A9>5280ANDA9<5320;
AC2:=A9>6520ANDA9<6570;
AE2:=A9>6828ANDA9<6878;
AF2:=A9>7132ANDA9<7182;
AG2:=A9>7341ANDA9<7391;
AH1:=A9>786ANDA9<826;
AI1:=A9>520ANDA9<570;
AG1:=A9>1360ANDA9<1410;
AL1:=A9>2333ANDA9<2383;
AA1:=A9>3826ANDA9<3876;
AK1:=A9>4856ANDA9<4906;
AB1:=A9>6142ANDA9<6192;
AC1:=A9>6802ANDA9<6852;
AE1:=A9>6912ANDA9<6962;
AF1:=A9>7264ANDA9<7304;
顶:=REF(HHV(H,94),3),NODRAW;
绝顶:=REFDATE(顶,DATE),NODRAW;
跑:=绝顶=HAND((C-L)<(O-C)OR(O-L)<(C-O)),NODRAW;
STICKLINE(跑,C,O,3,0),COLOR777777;
STICKLINE(跑,C,O,2,0),COLORAAAAAA;
STICKLINE(跑,C,O,1,0),COLORCCCCCC;
STICKLINE(跑,C,O,0.1,0),COLORFFFFFF;
STICKLINE(跑,L,H,0,0),COLORFFFFFF;
DRAWTEXT(跑,C*1.02,'绝顶')COLORFFFFFF;
VAR28:=REF(CLOSE,1);
VAR29:=SMA(MAX(CLOSE-VAR28,0),5.5,1)/SMA(ABS(CLOSE-VAR28),6,1)*100;
VAR4A:=EMA(CLOSE,3);
DRAWICON(COUNT(REF(VAR4A,1)<REF(VAR4A,2),5)=5ANDVAR4A>REF(VAR4A,1),L*0.99,3);
B36:=MA(CLOSE,6)-MA(CLOSE,12);
B612:=MA(CLOSE,12)-MA(CLOSE,24);
J:=((B36)/(CLOSE))*(17);
J1:=((B612)/(CLOSE))*(17);
DRAWTEXT((J<(-0.2))AND(J1<(-0.2))ANDCROSS(J,J1),(LOW)*(0.976),'红色抬阶'),COLORRED;
W4:=CROSS(C,REF(W3,1));
DRAWICON(W4ANDCOUNT(W4,5)=1,LOW,3);
[源码注释]通达信公式动态翻译结果
N赋值:720
涨停价赋值:对1日前的收盘价*1.10*100(进行)四舍五入/100
跌停价赋值:对1日前的收盘价*0.90*100(进行)四舍五入/100
DP赋值:(大盘的收盘价-1日前的大盘的收盘价)/1日前的大盘的收盘价
GG赋值:(收盘价-1日前的收盘价)/1日前的收盘价
CQ1赋值:(统计N日中满足GG-DP>0.04的天数+统计N日中满足GG-DP>0.08的天数+统计N日中满足GG-DP>0.12的天数+统计N日中满足GG>0.04的天数+统计N日中满足GG>0.08的天数+统计N日中满足对收盘价*100(进行)四舍五入/100=涨停价ORCLOSE>涨停价的天数)/2
CR1赋值:(统计N日中满足GG-DP<-0.04的天数+统计N日中满足GG-DP<-0.08的天数+统计N日中满足GG-DP<-0.12的天数+统计N日中满足GG<-0.04的天数+统计N日中满足GG<-0.08的天数+统计N日中满足对收盘价*100(进行)四舍五入/100=跌停价ORCLOSE<跌停价的天数)/2
CQ2赋值:CQ1的N/5日简单移动平均
CR2赋值:CR1的N/5日简单移动平均
超强数赋值:CQ2
超弱数赋值:CR2
超强净值赋值:超强数-超弱数
输出超强值:如果周期类型=5,返回超强净值,否则返回无效数,COLORFF00FF
M赋值:N/3
CQ1M赋值:(统计M日中满足GG-DP>0.04的天数+统计M日中满足GG-DP>0.08的天数+统计M日中满足GG-DP>0.12的天数+统计M日中满足GG>0.04的天数+统计M日中满足GG>0.08的天数+统计M日中满足收盘价=涨停价ORCLOSE>涨停价的天数)/2
CR1M赋值:(统计M日中满足GG-DP<-0.04的天数+统计M日中满足GG-DP<-0.08的天数+统计M日中满足GG-DP<-0.12的天数+统计M日中满足GG<-0.04的天数+统计M日中满足GG<-0.08的天数+统计M日中满足收盘价=跌停价ORCLOSE<跌停价的天数)/2
CQ2M赋值:CQ1M的M/5日简单移动平均
CR2M赋值:CR1M的M/5日简单移动平均
超强数M赋值:CQ2M
超弱数M赋值:CR2M
超强净值M赋值:超强数M-超弱数M
可比超强净值M赋值:超强净值M*3
输出中期:如果周期类型=5,返回可比超强净值M,否则返回无效数,COLOR00FFFF
S赋值:M/4
CQ1S赋值:(统计S日中满足GG-DP>0.04的天数+统计S日中满足GG-DP>0.08的天数+统计S日中满足GG-DP>0.12的天数+统计S日中满足GG>0.04的天数+统计S日中满足GG>0.08的天数+统计S日中满足收盘价=涨停价ORCLOSE>涨停价的天数)/2
CR1S赋值:(统计S日中满足GG-DP<-0.04的天数+统计S日中满足GG-DP<-0.08的天数+统计S日中满足GG-DP<-0.12的天数+统计S日中满足GG<-0.04的天数+统计S日中满足GG<-0.08的天数+统计S日中满足收盘价=跌停价ORCLOSE<跌停价的天数)/2
CQ2S赋值:CQ1S的S/5日简单移动平均
CR2S赋值:CR1S的S/5日简单移动平均
超强数S赋值:CQ2S
超弱数S赋值:CR2S
超强净值S赋值:超强数S-超弱数S
可比超强净值S赋值:超强净值S*12
输出短期:如果周期类型=5,返回可比超强净值S,否则返回无效数,COLORFFFFFF
输出异动:短期-中期,COLORSTICK,COLOR0000FF
起涨赋值:(短期>1日前的短期 AND 1日前的短期<=2日前的短期) OR (1日前的短期>2日前的短期 AND 2日前的短期<=3日前的短期) OR (2日前的短期>3日前的短期 AND 3日前的短期<=4日前的短期)
每日通达信公式解答:
编写条件:
MACD零轴上红柱连续缩短后又开始变长的第一天选股公式。
编写方法:
BARSLASTCOUNT(REF(MACD.MACD<REF(MACD.MACD,1)ANDMACD.MACD>0,1))>3ANDMACD.MACD>REF(MACD.MACD,1);
评论(0)