N:=14;
LC:=REF(CLOSE,1);
5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),5,1))*100);
TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,1)))),ABS((LOW-REF(CLOSE,1)))),10);
HD:=(HIGH-REF(HIGH,1));
LD:=(REF(LOW,1)-LOW);
DMP:=SUM(IF(((HD 0)AND(HD LD)),HD,0),10);
DMM:=SUM(IF(((LD 0)AND(LD HD)),LD,0),10);
PDI:=((DMP*100)/TR1);
MDI:=((DMM*100)/TR1);
ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);
AV:=(RSI5+ADX);
DXR:=(((ADX+REF(ADX,5))/2)+RSI5);
WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));
NEWVOL:=(RSI5-WR10);
ABC:=(AV+NEWVOL);
CROSS(ABC,0);
底背离:LLV(L,N)=LANDNOT(LLV(CCI,N)=CCI);
RSV:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
K:=EMA(RSV,3);
D:=EMA(K,3);
J:=(3*K-2*D);
KDJ1:=REF(COUNT(J REF(J,1),5) =3,1)ANDREF(J,1)
KDJ2:=J REF(J,1);
:IF(FILTER(KDJ1ANDKDJ2,3),1.5,0);
N:=5;
VAR1:=CLOSE REF(CLOSE,1)ANDCLOSE REF(CLOSE,2);
VAR2:=REF(VAR1,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR3:=REF(VAR2,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR4:=REF(VAR3,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR5:=REF(VAR4,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR6:=REF(VAR5,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR7:=REF(VAR6,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR8:=REF(VAR7,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR9:=REF(VAR8,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VARA:=REF(VAR9,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VARB:=REF(VARA,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VARC:=REF(VARB,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VARD:=CLOSE REF(CLOSE,1)ANDCLOSE REF(CLOSE,2);
VARE:=REF(VARD,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VARF:=REF(VARE,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR10:=REF(VARF,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR11:=REF(VAR10,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR12:=REF(VAR11,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR13:=REF(VAR12,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR14:=REF(VAR13,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR15:=REF(VAR14,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR16:=REF(VAR15,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR17:=REF(VAR16,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR18:=REF(VAR17,1)ANDCLOSE =REF(CLOSE,1)ANDCLOSE =REF(CLOSE,2);
VAR19:=REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13OR
VAR14ORVAR15ORVAR16ORVAR17ORVAR18,1)ANDVAR1;
TYP:=(HIGH+LOW+CLOSE)/3;
CC1:=(TYP-ma(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORFF00FF;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
LC:=REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100;
RSI:=(RSI1-50)*5,LINETHICK2,COLORFFFFFF;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
K1:=(K-50)*5,COLOR00FF00;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
出现:RRANDNOT(REF(RR,1))AND(RR1 -100ANDBB1 -100)ANDCB1 -100ANDVAR19=1;
CC2:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),COLORYELLOW;
公式解读:
[源码注释]通达信公式动态公式解读
N赋值:14
LC赋值:1日前的收盘价
RSI5赋值:(((收盘价-LC)和0的较大值的5日[1日权重]移动平均/(收盘价-LC)的绝对值的5日[1日权重]移动平均)*100)
TR1赋值:(最高价-最低价)和(最高价-1日前的收盘价)的绝对值的较大值和(最低价-1日前的收盘价)的绝对值的较大值的10日累和
HD赋值:(最高价-1日前的最高价)
LD赋值:(1日前的最低价-最低价)
DMP赋值:如果((HD ,返回?,否则返回?的?日累和
0)AND(HD
LD)),HD,0),10)
DMM赋值:如果((LD ,返回?,否则返回?的?日累和
0)AND(LD
HD)),LD,0),10)
PDI赋值:((DMP*100)/TR1)
MDI赋值:((DMM*100)/TR1)
ADX赋值:(((MDI-PDI)的绝对值/(MDI+PDI))*100)的5日简单移动平均
AV赋值:(RSI5+ADX)
DXR赋值:(((ADX+5日前的ADX)/2)+RSI5)
WR10赋值:((100*(10日内最高价的最高值-收盘价))/(10日内最高价的最高值-10日内最低价的最低值))
NEWVOL赋值:(RSI5-WR10)
ABC赋值:(AV+NEWVOL)
ABC上穿0
输出
底背离:N日内最低价的最低值=LANDNOT(N日内CCI的最低值=CCI)
RSV赋值:(收盘价-18日内最低价的最低值)/(18日内最高价的最高值-18日内最低价的最低值)*100
K赋值:RSV的3日指数移动平均
D赋值:K的3日指数移动平均
J赋值:(3*K-2*D)
KDJ1赋值:?日前的统计?日中满足J 的天数
1日前的J,5)
=3,1)ANDREF(J,1)
20
KDJ2赋值:J
1日前的J
输出
反转:如果KDJ1ANDKDJ2的3日过滤,返回1.5,否则返回0
N赋值:5
VAR1赋值:收盘价 1日前的收盘价ANDCLOSE 2日前的收盘价
VAR2赋值:1日前的VAR1ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR3赋值:1日前的VAR2ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR4赋值:1日前的VAR3ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR5赋值:1日前的VAR4ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR6赋值:1日前的VAR5ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR7赋值:1日前的VAR6ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR8赋值:1日前的VAR7ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR9赋值:1日前的VAR8ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VARA赋值:1日前的VAR9ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VARB赋值:1日前的VARAANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VARC赋值:1日前的VARBANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VARD赋值:收盘价 1日前的收盘价ANDCLOSE 2日前的收盘价
VARE赋值:1日前的VARDANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VARF赋值:1日前的VAREANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR10赋值:1日前的VARFANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR11赋值:1日前的VAR10ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR12赋值:1日前的VAR11ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR13赋值:1日前的VAR12ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR14赋值:1日前的VAR13ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR15赋值:1日前的VAR14ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR16赋值:1日前的VAR15ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR17赋值:1日前的VAR16ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR18赋值:1日前的VAR17ANDCLOSE =1日前的收盘价ANDCLOSE =2日前的收盘价
VAR19赋值:1日前的VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13OR
VAR14ORVAR15ORVAR16ORVAR17ORVAR18ANDVAR1
TYP赋值:(最高价+最低价+收盘价)/3
CC1赋值:(TYP-TYP的14日简单移动平均)/(0.015*TYP的14日平均绝对偏差),COLORFF00FF
C1赋值:CC1的3日[1日权重]移动平均
C2赋值:C1的3日[1日权重]移动平均
C3赋值:3*C1-2*C2
CB1赋值:C3的5日指数移动平均
CB2赋值:1日前的CB1
LC赋值:1日前的收盘价
RSI1赋值:收盘价-LC和0的较大值的6日[1日权重]移动平均/收盘价-LC的绝对值的6日[1日权重]移动平均*100
RSI赋值:(RSI1-50)*5,线宽为2,COLORFFFFFF
R1赋值:RSI的3日[1日权重]移动平均
D1赋值:R1的3日[1日权重]移动平均
J1赋值:3*R1-2*D1
RR1赋值:J1的5日指数移动平均
RR2赋值:1日前的RR1
RR赋值:RR1 RR2
RSV赋值:(收盘价-9日内最低价的最低值)/(9日内最高价的最高值-9日内最低价的最低值)*100
K赋值:RSV的3日[1日权重]移动平均
K1赋值:(K-50)*5,COLOR00FF00
K2赋值:K1的3日[1日权重]移动平均
D2赋值:K2的3日[1日权重]移动平均
J2赋值:3*K2-2*D2
BB1赋值:J2的5日指数移动平均
BB2赋值:1日前的BB1
输出
黑马出现:RRANDNOT(1日前的RR)AND(RR1 -100ANDBB1 -100)ANDCB1 -100ANDVAR19=1
CC2赋值:(TYP-TYP的14日简单移动平均)/(0.015*TYP的14日平均绝对偏差),画黄色