指标公式
软件: 通达信 
公式类型: 副图 
二级分类: 波段 无未来函数 短线 买卖点 
炒股叉_20190617_105239.png

炒股叉_20190617_105244.png

[lywrap=通达信副图指标公式][lycode=tdx,true]RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1),COLORWHITE;
D:=SMA(K,3,1),COLORYELLOW;
J:=3*K-2*D,COLORFF00FF;
A:=250;
DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:=EMA(DIFF,9),COLORBLUE,LINETHICK0;
MACD:=2*(DIFF-DEA);
MM:=IF(MACD< 0,MACD,0);
JJ:=MM> REF(MM,1);
ZZ:=REF(JJ,1)=1;
准备:=(JJ AND ZZ)*DEA;
STICKLINE(准备=DEA,1,-1,2,1),COLORFFFF00;
JH:=HHV(MAX(K,MAX(D,J)),A);
DH:=HHV(MAX(DIFF,DEA),A);
SH:=INTPART(JH/DH)/2;
DIFF50:=SH*DIFF+50,COLORFFFF00;
DEA50:=SH*DEA+50,COLORBLUE;
STICKLINE(DIFF50>DEA50,0,1.5*(DIFF50-DEA50),0,0),COLORRED;
STICKLINE(DIFF50<DEA50,0,1.5*(DIFF50-DEA50),0,0),COLORFFFF00;
红柱:IF(1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1.5*(DIFF50-DEA50),0),
STICK,COLORLICYAN;
绿柱:IF(1.5*(DIFF50-DEA50)<REF(1.5*(DIFF50-DEA50),1),
1.5*(DIFF50-DEA50),0),STICK,COLORGREEN;
缩头:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)>REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)< REF(1.5*(DIFF50-DEA50),1),1,0);
缩脚:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);
杀多:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)> REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)<REF(1.5*(DIFF50-DEA50),1),1,0);
诱空:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);
阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),1,0);
DRAWTEXT(FILTER(杀多,3) AND 杀多,1.5*(DIFF50-DEA50),'杀多'),COLORFF00FF;
DRAWTEXT(FILTER(缩头,3) AND 缩头,1.5*(DIFF50-DEA50)+0.2,'卖'),COLORFF00FF;
DRAWTEXT(FILTER(诱空,3) AND 诱空,1.5*(DIFF50-DEA50),'?洗盘'),COLOR00FF00;
DRAWTEXT(FILTER(缩脚,3) AND 缩脚,1.5*(DIFF50-DEA50)-0.2,'买'),COLOR00FF00;
DRAWTEXT(FILTER(阻力,16) AND 1.5*(DIFF50-DEA50)>=0,1.5*(DIFF50-DEA50)+0.01,'¤阻力'),COLOR00FFFF;
VRA:=REF(CLOSE,1);
VRB:=SMA(MAX(CLOSE-VRA,0),6,1)/SMA(ABS(CLOSE-VRA),6,1)*100;
VRC:=(2*CLOSE+HIGH+LOW)/4;
VR0:=LLV(LOW,34);
VR1:=HHV(HIGH,34);
VR2:=EMA((VRC-VR0)/(VR1-VR0)*100,6);
VR3:=EMA(0.667*REF(VR2,1)+0.333*VR2,4);
VA1:=(REF(HIGH,1)+REF(LOW,1))/2;
VA2:=MA(CLOSE,20)+2*STD(CLOSE,20);
VA3:=REF(CLOSE,1);

VA4:=SMA(MAX(CLOSE-VA3,0),7,1)/SMA(ABS(CLOSE-VA3),7,1)*100;
VA5:=CROSS(79,VA4);
VA6:=FILTER(VA5,4);
VVD:=MA(CLOSE,80)-MA(CLOSE,10)/3;
VA7:=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);
X1:=CROSS(VA1,VA2) OR VA6;
X2:=CROSS(84,VRB);
STICKLINE(X1 OR X2,1.5*(DIFF50-DEA50)*1.05,1.5*(DIFF50-DEA50)*1.08,3,0);
Y1:=IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VA2>VA3,3) AND REF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0);
Y2:=IF(CLOSE<VVD AND VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0);
Y3:=CROSS(VA7,10);
Y4:=IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VR2>VR3,3) AND REF(LOW,1)=LLV(LOW,120) AND CLOSE>OPEN,1,0);
STICKLINE(Y1 OR Y2 OR Y3 OR Y4,1.5*(DIFF50-DEA50)*0.90,1.5*(DIFF50-DEA50)*0.99,3,0);
DD:=C=HHV(C,180);
EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*1.5*(DIFF50-DEA50),LINETHICK2,COLORWHITE;
顶背离:(DD AND EE AND DEA< HHV(DEA,180))*3*ABS(DIFF50-DEA50),STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:= DEA> REF(DEA,1) AND REF(DEA> REF(DEA,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*1.5*(DIFF50-DEA50),LINETHICK2,COLORYELLOW;
底背离:(FF AND GG AND DEA> LLV(DEA,180))*3*(DIFF50-DEA50),STICK,LINETHICK3,COLORRED;[/lycode][lycode=tdx2,true]RSV赋值:(收盘价-9日内最低价的最低值)/(9日内最高价的最高值-9日内最低价的最低值)*100
K赋值:RSV的3日[1日权重]移动平均,画白色
D赋值:K的3日[1日权重]移动平均,画黄色
J赋值:3*K-2*D,COLORFF00FF
A赋值:250
DIFF赋值:(收盘价的12日指数移动平均 - 收盘价的26日指数移动平均)
DEA赋值:DIFF的9日指数移动平均,画蓝色,线宽为0
MACD赋值:2*(DIFF-DEA)
MM赋值:如果MACD<0,返回MACD,否则返回0
JJ赋值:MM> 1日前的MM
ZZ赋值:1日前的JJ=1
准备赋值:(JJ AND ZZ)*DEA
当满足条件准备=DEA时,在1和-1位置之间画柱状线,宽度为2,1不为0则画空心柱.,COLORFFFF00
JH赋值:A日内K和D和J的较大值的较大值的最高值
DH赋值:A日内DIFF和DEA的较大值的最高值
SH赋值:JH/DH的整数部分/2
DIFF50赋值:SH*DIFF+50,COLORFFFF00
DEA50赋值:SH*DEA+50,画蓝色
当满足条件DIFF50>DEA50时,在0和1.5*(DIFF50-DEA50)位置之间画柱状线,宽度为0,0不为0则画空心柱.,画红色
当满足条件DIFF50<DEA50时,在0和1.5*(DIFF50-DEA50)位置之间画柱状线,宽度为0,0不为0则画空心柱.,COLORFFFF00
输出红柱:如果1.5*(DIFF50-DEA50)>1日前的1.5*(DIFF50-DEA50),返回1.5*(DIFF50-DEA50),否则返回0,STICK,画淡青色
输出绿柱:如果1.5*(DIFF50-DEA50)<1日前的1.5*(DIFF50-DEA50),返回1.5*(DIFF50-DEA50),否则返回0,STICK,画绿色
缩头赋值:如果1.5*(DIFF50-DEA50)>0ANDREF(1.5*(DIFF50-DEA50),1)>2日前的1.5*(DIFF50-DEA50)AND1.5*(DIFF50-DEA50)<1日前的1.5*(DIFF50-DEA50),返回1,否则返回0
缩脚赋值:如果1.5*(DIFF50-DEA50)<0ANDREF(1.5*(DIFF50-DEA50),1)<2日前的1.5*(DIFF50-DEA50)AND1.5*(DIFF50-DEA50)>1日前的1.5*(DIFF50-DEA50),返回1,否则返回0
杀多赋值:如果1.5*(DIFF50-DEA50)<0ANDREF(1.5*(DIFF50-DEA50),1)>2日前的1.5*(DIFF50-DEA50)AND1.5*(DIFF50-DEA50)<1日前的1.5*(DIFF50-DEA50),返回1,否则返回0
诱空赋值:如果1.5*(DIFF50-DEA50)>0ANDREF(1.5*(DIFF50-DEA50),1)<2日前的1.5*(DIFF50-DEA50)AND1.5*(DIFF50-DEA50)>1日前的1.5*(DIFF50-DEA50),返回1,否则返回0
阻力赋值:如果收盘价上穿收盘价的20日简单移动平均ORCROSS(收盘价,收盘价的60日简单移动平均),返回1,否则返回0
当满足条件杀多的3日过滤AND杀多时,在1.5*(DIFF50-DEA50)位置书写文字,COLORFF00FF
当满足条件缩头的3日过滤AND缩头时,在1.5*(DIFF50-DEA50)+0.2位置书写文字,COLORFF00FF
当满足条件诱空的3日过滤AND诱空时,在1.5*(DIFF50-DEA50)位置书写文字,COLOR00FF00
当满足条件缩脚的3日过滤AND缩脚时,在1.5*(DIFF50-DEA50)-0.2位置书写文字,COLOR00FF00
当满足条件阻力的16日过滤AND1.5*(DIFF50-DEA50)>=0时,在1.5*(DIFF50-DEA50)+0.01位置书写文字,COLOR00FFFF
VRA赋值:1日前的收盘价
VRB赋值:收盘价-VRA和0的较大值的6日[1日权重]移动平均/收盘价-VRA的绝对值的6日[1日权重]移动平均*100
VRC赋值:(2*收盘价+最高价+最低价)/4
VR0赋值:34日内最低价的最低值
VR1赋值:34日内最高价的最高值
VR2赋值:(VRC-VR0)/(VR1-VR0)*100的6日指数移动平均
VR3赋值:0.667*1日前的VR2+0.333*VR2的4日指数移动平均
VA1赋值:(1日前的最高价+1日前的最低价)/2
VA2赋值:收盘价的20日简单移动平均+2*收盘价的20日估算标准差
VA3赋值:1日前的收盘价
VA4赋值:收盘价-VA3和0的较大值的7日[1日权重]移动平均/收盘价-VA3的绝对值的7日[1日权重]移动平均*100
VA5赋值:79上穿VA4
VA6赋值:VA5的4日过滤
VVD赋值:收盘价的80日简单移动平均-收盘价的10日简单移动平均/3
VA7赋值:3*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均-2*(收盘价-27日内最低价的最低值)/(27日内最高价的最高值-27日内最低价的最低值)*100的5日[1日权重]移动平均的3日[1日权重]移动平均
X1赋值:VA1上穿VA2 OR VA6
X2赋值:84上穿VRB
当满足条件X1ORX2时,在1.5*(DIFF50-DEA50)*1.05和1.5*(DIFF50-DEA50)*1.08位置之间画柱状线,宽度为3,0不为0则画空心柱.
Y1赋值:如果统计8日中满足收盘价<1日前的收盘价的天数/8>0.3ANDCOUNT(VA2>VA3,3)ANDREF(最低价,1)=120日内最低价的最低值ANDCLOSE>开盘价,返回1,否则返回0
Y2赋值:如果收盘价<VVDANDVOL/240>成交量(手)的5日简单移动平均/240ANDCLOSE>1日前的收盘价*1.08ANDCLOSE<收盘价的13日简单移动平均*1.3,返回1,否则返回0
Y3赋值:VA7上穿10
Y4赋值:如果统计8日中满足收盘价<1日前的收盘价的天数/8>0.3ANDCOUNT(VR2>VR3,3)ANDREF(最低价,1)=120日内最低价的最低值ANDCLOSE>开盘价,返回1,否则返回0
当满足条件Y1ORY2ORY3ORY4时,在1.5*(DIFF50-DEA50)*0.90和1.5*(DIFF50-DEA50)*0.99位置之间画柱状线,宽度为3,0不为0则画空心柱.
DD赋值:收盘价=180日内收盘价的最高值
EE赋值:DEA< 1日前的DEA AND 1日前的DEA<1日前的DEA=1
CC赋值:收盘价> 1日前的收盘价 AND 1日前的收盘价>1日前的收盘价=1
输出上升背离:(CC AND EE)*1.5*(DIFF50-DEA50),线宽为2,画白色
输出顶背离:(DD AND EE AND DEA< 180日内DEA的最高值)*3*DIFF50-DEA50的绝对值,STICK,线宽为3,画绿色
FF赋值:收盘价=180日内收盘价的最低值
GG赋值: DEA> 1日前的DEA AND 1日前的DEA>1日前的DEA=1
LL赋值:收盘价< 1日前的收盘价 AND 1日前的收盘价<1日前的收盘价=1
输出下降背离:(LL AND GG)*1.5*(DIFF50-DEA50),线宽为2,画黄色
输出底背离:(FF AND GG AND DEA> 180日内DEA的最低值)*3*(DIFF50-DEA50),STICK,线宽为3,画红色
[/lycode][/lywrap]

下载地址:https://pan.baidu.com/s/1l3QhyYZn2fGnbPIrPCuAOg

看了该指标的人还看了:
与私募同进出指标    真涨指标,成功率非常高    三碗不过岗指标
主力买卖指标    明明白白指标    绝对底部指标

使用道具 举报

回复