通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
公式解读:
公式源码如下:
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),10);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD 0 amp; amp;HD LD,HD,0),10);
DMM:=EXPMEMA(IF(LD 0 amp; amp;LD HD,LD,0),10);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
PDI 9.5ANDPDI MDIANDMDI 40ANDV/REF(V,1) 0.8ANDREF(C,1)/REF(C,3) 0.94ANDC REF(C,1)ANDREF(V,1)/REF(V,2) 1.5;
RR1:=ma(CLOSE,27);
RR2:=(CLOSE-RR1)/RR1*100;
RRA:=MA(RR2,2);
RRB:=BArslAst(crOSS(-10,RRA)=1);
RRD:=RRA -10ANDRRB
STICKLINE(IF(RRD,-120,0),-120,0,8,0),COLOR33FFFF;
起爆点:IF(RRD,-120,0),COLOR00FF66,colorliblue,LINETHICK2;
TYP:=(HIGH+LOW+CLOSE)/3;
14:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),colorred,LINETHICK2;
强势线:100,LINETHICK2;
低位线:-100,colorred,LINETHICK2;
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR2:=LLV(LOW,20);
VAR3:=HHV(HIGH,20);
操盘:=3*VAR300-2*VAR400;
PS1:=CROSS(操盘,VAR300)ANDVAR300 2.1ANDC
STICKLINE(PS1,30,-100,3,0),COLORFF00FF;
STICKLINE(PS1,30,-100,2,0),COLORFF66FF;
STICKLINE(PS1,30,-100,1,0),COLORFF66CC;
STICKLINE(PS1,30,-100,1,0),COLORFF99FF;
STICKLINE(PS1,30,-100,1,0),COLORFFCCFF;
STICKLINE(PS1,30,-100,1,0),COLOR00FFFF;
STICKLINE(PS1,30,-100,0.3,0),COLOR66FF33;
DRAWTEXT(PS1,42, 起爆点 ),coloryellow;
//六大
LddiFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
LddeA:=EMA(LDDIFF,9);
//{STICKLINE(DIFF DEA,1,1.8,3,0),colorred;
//STICKLINE(DIFF DEA,1,1.8,3,0),colorgreen;}
MCDA金叉:LDDIFF LDDEA,NODRAW;
LDRSV:=(CLOSE-LLV(LOW,12))/(HHV(HIGH,12)-LLV(LOW,12))*100;
LDK:=SMA(LDRSV,3,1);
LDD:=SMA(LDK,3,1);
//{STICKLINE(K D,2,2.8,3,0),colorred;
//STICKLINE(K D,2,2.8,3,0),colorgreen;}
金叉:LDK LDD,NODRAW;
LDLC:=REF(CLOSE,1);
LD1:=(SMA(MAX(CLOSE-LDLC,0),9,1))/(SMA(Abs(CLOSE-LDLC),9,1))*100;
LDRSI2:=(SMA(MAX(CLOSE-LDLC,0),26,1))/(SMA(ABS(CLOSE-LDLC),26,1))*100;
//{STICKLINE(RSI1 RSI2,3,3.8,3,0),colorred;
//STICKLINE(RSI1 RSI2,3,3.8,3,0),colorgreen;}
RSI金叉:LDRSI1 LDRSI2,NODRAW;
LDLwr1:=SMA(LDRSV,3,1);
LDLWR2:=SMA(LDLWR1,3,1);
//{STICKLINE(LWR1 LWR2,4,4.8,3,0),colorred;
//STICKLINE(LWR1 LWR2,4,4.8,3,0),colorgreen;}
LWR金叉:LDLWR1 LDLWR2,NODRAW;
LDbbi:=(MA(CLOSE,3)+MA(CLOSE,9)+MA(CLOSE,12)+MA(CLOSE,26))/4;
//{STICKLINE(CLOSE BBI,5,5.8,3,0),colorred;
//STICKLINE(CLOSE BBI,5,5.8,3,0),colorgreen;}
BBI金叉:CLOSE LDBBI,NODRAW;
LDmtm:=CLOSE-REF(CLOSE,1);
LDmms:=100*EMA(EMA(LDMTM,9),9)/EMA(EMA(ABS(LDMTM),9),3);
LDMMM:=100*EMA(EMA(LDMTM,26),12)/EMA(EMA(ABS(LDMTM),26),12);
//{STICKLINE(MMS MMM,6,6.8,3,0),colorred;
//STICKLINE(MMS MMM,6,6.8,3,0),colorgreen;}
MMS金叉:LDMMS LDMMM,NODRAW;
STICKLINE(MCDA金叉ANDkdJ金叉ANDRSI金叉ANDLWR金叉ANDBBI金叉ANDMMS金叉,-110,-120,3,0),coloryellow;
HJ_1:=HHV(HIGH,9)-LLV(LOW,9);
HJ_2:=HHV(HIGH,9)-CLOSE;
HJ_3:=CLOSE-LLV(LOW,9);
HJ_4:=HJ_2/HJ_1*100-70;
HJ_5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;
HJ_6:=(2*CLOSE+HIGH+LOW)/4;
HJ_7:=SMA(HJ_3/HJ_1*100,3,1);
HJ_8:=LLV(LOW,34);
HJ_9:=SMA(HJ_7,3,1)-SMA(HJ_4,9,1);
HJ_10:=IF(HJ_9 100,HJ_9-100,0);
HJ_11:=HHV(HIGH,34);
HJ_12:=EMA((HJ_6-HJ_8)/(HJ_11-HJ_8)*100,8);
HJ_13:=EMA(HJ_12,5);
第二指标交叉线:=HJ_12-HJ_13;
买入条件:=-第二指标交叉线;
卖出:=REF(第二指标交叉线,1) 0AND第二指标交叉线 =0OR(第二指标交叉线 1AND第二指标交叉线 =0ANDCLOSE OPEN),colorred;
买入:=卖出=0ANDREF(第二指标交叉线,1) 0AND第二指标交叉线
DRAWTEXT(买入,-110, 买入 ),coloryellow;
RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,3,1);
J1:=3*K-2*D;
趋势J2:=EMA(K,3);
WH:=DRAWLINE(D =HHV(D,21),D,D =LLV(D,21),D,1);
精准买点:CROSS(趋势J1,WH)ANDCROSS(趋势J2,WH);
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);V4:=2*(V2-V3)*5.5;
撤:IF(V4 =0,V4,0),colorblue;
主力进:IF(V4 =0,V4,0),colorff00ff;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
N:=14;
N1:=10;
N2:=6;
TYP:=(IF(ISNULL(HIGH),CLOSE,HIGH)+IF(ISNULL(LOW),CLOSE,LOW)+CLOSE)/3;
:(TYP-ma(TYP,N))/(0.015*AVEDEV(TYP,N));
wr1:100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));
WR2:100*(HHV(HIGH,N2)-CLOSE)/(HHV(HIGH,N2)-LLV(LOW,N2));
V1:=(O-REF(C,1))/REF(C,1);
V2:=V1 0.03;
V3:=EVERY(V2,15);
V4:=EXIST(V3,3);
V5:=V1 0.03;
FILTER(V5ANDV4,3);
A:100;
B:-100;
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
进场:IF(VB =0,VB,0),Colorred;
大盘资金撤走:IF(VB =0,VB,0),colorgreen;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
准备现金:STICKLINE(趋势线 =13,0,20,5,0),colorcc9900;
aa:=(趋势线 =13)andfilter((趋势线 =13),15);
drawtext(aa,30, 准备现金 ),colorcc9900;
买入股票:STICKLINE(趋势线 =13ANDV12 13,0,50,5,0),color0099ff;
bb:=(趋势线 =13ANDV12 13)andfilter((趋势线 =13ANDV12 13),10);
drawtext(bb,60, 买入股票 ),color0099ff;
卖临界:STICKLINE(趋势线 90and趋势线 ref(趋势线,1),100,95,15,1),COLORFFFF00;
见顶清仓:filter(趋势线 90and趋势线 ref(趋势线,1)and主力进 ref(主力进,1),8);
DRAWTEXT(见顶清仓,90, ),coloryellow;
cc:=(趋势线 =90ANDV12)andfilter((趋势线 =90ANDV12),10);
stickline(大盘资金进场and趋势线 13,0,30,10,0),colorred;
stickline(大盘资金撤走and趋势线 90,0,30,10,0),colorgreen;
stickline(主力进and趋势线 13,0,40,10,0),colorff00ff;
stickline(主力撤and趋势线 90,0,40,10,0),colorblue;
HLM1:=MA(HHV(H,485),17);
HLM2:=MA(HHV(H,222),17);
HLM3:=MA(HHV(H,96),17);
HLM4:=MA(LLV(L,485),17);
HLM5:=MA(LLV(L,222),17);
HLM6:=MA(LLV(L,96),17);
HLM7:=MA((HLM1*0.558+HLM2*0.558+HLM3*0.558+HLM4*0.96+HLM5*0.96+HLM6*0.96)/6,17);
HLM8:=MA((HLM1*0.55+HLM2*0.55+HLM3*0.65+HLM4*1.25+HLM5*1.23+HLM6*1.2)/6,17);
HLM9:=MA((HLM1*0.68+HLM2*0.68+HLM3*0.68+HLM4*1.3+HLM5*1.3+HLM6*1.3)/6,17);
HLM10:=MA((HLM7*3+HLM8*2+HLM9)/6*1.738,17);
HLM11:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1)*100;
HLM12:=MA(IF(C*1.35 =HLM10,HLM11*10,HLM11/10),3);
TYP:=IF((H CANDC O)OR(H OANDO =C),C,H)+IF((L CANDC O)OR(L OANDO =C),CLOSE,LOW)/3;
cci:Ema((TYP-MA(TYP,36.0270012))/(0.015*AVEDEV(TYP,36.0270012)),2.0332),colorgreen;
stICKLINE(CCI 100,CCI,100,6,0),colormagenta;
STICKLINE(CCI -150,CCI,-150,6,0),coloryellow;
STICKLINE(C 0,100,101,10,0),colorred;
STICKLINE(C 0,-150,-151,8,0),colorgreen;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_82:=ZQ_79ANDZQ_81ANDZQ_76ANDZQ_71ANDZQ_62;
ZQ_83:=ZQ_66ANDZQ_76ANDZQ_71ANDZQ_62;
ZQ_84:=ZQ_82ORZQ_83;
ZQ_85:=ZQ_18ANDZQ_53;
最强音终极:ZQ_84ORZQ_85,COLORRED;
[源码注释]通达信公式动态公式解读
ZT赋值:如果模糊匹配品种名称ORNAMELIKE( *ST ),返回收盘价=计算涨停价,否则返回如果模糊匹配品种代码OR(模糊匹配品种代码ANDDATE =1200824),返回收盘价=计算涨停价,否则返回收盘价=计算涨停价
统计30日中满足1日前的取反ANDZT的天数=5