多年优化的实战指标:KDJ虎

VAR1:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
VAR2:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
VAR3A:=SMA(VAR2,13,8);
多方能量: SMA(VAR3A,13,8),DOTLINE,COLORRED;
空方能量: SMA(VAR1,21,8),DOTLINE,COLORGREEN;

A0:=(2*C+H+L)/4;
均线:=MA(A0,3)>REF(MA(A0,3),1);
A1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
A2:=EMA(WINNER(C)*100,5);
A3:=MA(SMA(C-REF(C,1),3,1)/SMA(H-REF(C,1),3,1),3)*100;
K:MA(3*SMA(A1,6,1)-2*SMA(SMA(A1,5,1),5,1),3),LINETHICK1,COLORWHITE;
D:MA(K,3),COLORYELLOW,LINETHICK1;
J:3*K-2*D,COLORYELLOW,LINETHICK1;
A4:=SMA(MAX(C-REF(C,2),0),6,1)/SMA(ABS(C-REF(C,2)),6,1)*100;
A5:=MA(3*SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1)-2*SMA(SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1),3,1),3);
低吸:IF(CROSS(A4,14) OR A5>REF(A5,1) AND CROSS(K,A2)AND K<40,10,0),COLORYELLOW;
IF(A2>80 AND CROSS(95,K),85,100);
入虎穴:K<5 AND LLV(C,3)/HHV(C,20)<0.8,COLORYELLOW;
STICKLINE(入虎穴,0,30,3,0),COLORYELLOW;
A6:=COUNT(CROSS(K,A2),2)=1 AND CROSS(K,A5)AND A5/REF(A5,1)>0.9 AND K<50;
A7:=CROSS(K,D)AND D<10 OR CROSS(K,D)AND CROSS(K,A5)AND D<18;
DRAWTEXT(FILTER((A6 OR A7)AND K>REF(K,1),5)AND 均线 ,D,'金叉');
DRAWTEXT(CROSS(D,K)AND CROSS(A5,K)AND D>85,D,'死叉');
DRAWTEXT(FILTER(K>REF(K,1)AND (CROSS(K,10)OR CROSS(K,A2))AND COUNT(A4<14,3)>=1,3),15,'抱虎仔');
无限风光:A2>85 AND K>85 OR A2>90 OR K>90,LINETHICK0,COLORLIGRAY;
STICKLINE(无限风光,MAX(A2,K),100,5,1),COLORLIGRAY;
DRAWICON(CROSS(A3,-300)AND K<10,5,1);
A8:=BARSLAST(REF(CROSS(K,D),1));
二金:=(A8<15 AND D<50 AND K>REF(K,A8+1) AND CROSS(K,D)AND A5<60);
DRAWTEXT(二金 AND 均线,K,'二金'),COLORYELLOW;
A9:=LLV(C,2)<REF(LLV(C,15),2);
DRAWTEXT(二金 AND A9,K,'底背离'),COLORRED;
DRAWTEXT(LONGCROSS(J,K,7)AND CROSS(J,A2)AND A2<30 AND A2>REF(A2,1),K,'穿三线'),COLORMAGENTA;
DRAWTEXT(CROSS(84,A4)AND CROSS(K,A4),90,'虎口'),COLOR00FF00;
A10:=MA((A0-MA(A0,13))/(0.15*AVEDEV(A0,13)),3);
DRAWICON(CROSS(A10,-15)AND J>REF(J,1),5,1);
DRAWICON(CROSS(20,A10),100,2);

IF(K<REF(K,1),K,DRAWNULL),COLORGREEN,LINETHICK1;
IF(D<REF(D,1),D,DRAWNULL),COLORGREEN,LINETHICK1;
IF(J<REF(J,1),J,DRAWNULL),COLORFFFF00,LINETHICK1;
IF(K>REF(K,1),K,DRAWNULL),COLORRED,LINETHICK1;
IF(D>REF(D,1),D,DRAWNULL),COLORRED,LINETHICK1;
IF(J>REF(J,1),J,DRAWNULL),COLORFF00FF,LINETHICK1;

{掘底买点}
WVAR1:=(HIGH+LOW+CLOSE)/3;
WVAR2:=(WVAR1-MA(WVAR1,14))/(0.015*AVEDEV(WVAR1,14));
WVAR3:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,80,0);
WVAR4:=IF(ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3),50,0);
STICKLINE(WVAR3,80,95,0,0),COLORWHITE;
STICKLINE(WVAR3,50,80,3,0),COLOR3366BB;
STICKLINE(WVAR3,50,80,2,0),COLOR3399CC;
STICKLINE(WVAR3,50,80,1,0),COLOR33CCEE;
STICKLINE(WVAR3,50,80,0.1,0),COLOR33FFFF;
STICKLINE(WVAR3,20,50,5,0),COLOR3366BB;
STICKLINE(WVAR3,20,50,3.3,0),COLOR3399CC;
STICKLINE(WVAR3,20,50,1.6,0),COLOR33CCEE;
STICKLINE(WVAR3,20,50,0.1,0),COLOR33FFFF;
STICKLINE(WVAR4,50,65,0,0),COLORWHITE;
STICKLINE(WVAR4,30,50,3,0),COLOR000055;
STICKLINE(WVAR4,30,50,2,0),COLOR000088;
STICKLINE(WVAR4,30,50,1,0),COLOR0000BB;
STICKLINE(WVAR4,30,50,0.1,0),COLOR0000EE;
STICKLINE(WVAR4,10,30,5,0),COLOR000055;
STICKLINE(WVAR4,10,30,3.3,0),COLOR000088;
STICKLINE(WVAR4,10,30,1.6,0),COLOR0000BB;
STICKLINE(WVAR4,10,30,0.1,0),COLOR0000EE;
掘底买点:=WVAR3,COLORYELLOW,LINETHICK2;
黑码信号:=WVAR4,COLORRED,LINETHICK2;
DRAWTEXT(WVAR2<-110 AND WVAR3>0,87,'▲山人B点'),COLORYELLOW;
DRAWTEXT(WVAR2<-110 AND WVAR4>0,57,'▲山人黑码'),COLORRED;
 



未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:WINNER

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

VAR1赋值:(21日内最高价最高值-收盘价)/(21日内最高价最高值-21日内最低价最低值)*100-10

VAR2赋值:(收盘价-21日内最低价最低值)/(21日内最高价最高值-21日内最低价最低值)*100
VAR2的13日[8日权重]移动平均
VAR3A的13日[8日权重]移动平均
VAR1的21日[8日权重]移动平均

A0赋值:(2*C+H+L)/4

均线赋值:A0的3日简单移动平均>REF(A0的3日简单移动平均,1)

A1赋值:(收盘价-7日内最低价最低值)/(7日内最高价最高值-7日内最低价最低值)*100

A2赋值:EMA(C计算的获利盘比例*100,5)

A3赋值:MA(SMA(C-1日前的C,3,1)/SMA(H-1日前的C,3,1),3)*100
A1的6日[1日权重]移动平均
输出
D:K的3日简单移动平均,画黄色, 线宽为1
输出
J:3*K-2*D,画黄色, 线宽为1

A4赋值:SMA(C-2日前的C和0较大值,6,1)/SMA(C-2日前的C的绝对值,6,1)*100

A5赋值:MA(3*SMA((C-21日内L最低值)/(21日内H最高值-21日内L最低值)*100,5,1)-2*SMA(SMA((C-21日内L最低值)/(21日内H最高值-21日内L最低值)*100,5,1),3,1),3)
输出
低吸:IF(A4上穿14 OR A5>1日前的A5 AND K上穿A2AND K<40,10,0),画黄色

IF(A2>80 AND 95上穿K,85,100)
输出
入虎穴:K<5 AND 3日内C最低值/20日内C最高值<0.8,画黄色
当满足条件入虎穴时,在0和30之间画柱状线

A6赋值:统计2日满足K上穿A2的天数=1 AND K上穿A5AND A5/1日前的A5>0.9 AND K<50

A7赋值:K上穿DAND D<10 OR K上穿DAND K上穿A5AND D<18

DRAWTEXT(FILTER((A6 OR A7)AND K>1日前的K,5)AND 均线 ,D,'金叉')

DRAWTEXT(D上穿KAND A5上穿KAND D>85,D,'死叉')

DRAWTEXT(FILTER(K>1日前的KAND (K上穿10OR K上穿A2)AND 统计3日满足A4<14的天数>=1,3),15,'抱虎仔')
输出
无限风光:A2>85 AND K>85 OR A2>90 OR K>90,LINETHICK0,COLORLIGRAY

STICKLINE(无限风光,A2和K较大值,100,5,1),COLORLIGRAY

DRAWICON(A3上穿-300AND K<10,5,1)

A8赋值:上次1日前的K上穿D距今天数

二金赋值:(A8<15 AND D<50 AND K>A8+1日前的K AND K上穿DAND A5<60)
当满足条件二金 AND 均线时,在K和'二金'位置书写文字

A9赋值:2日内C最低值当满足条件二金 AND A9时,在K和'底背离'位置书写文字

DRAWTEXT(LONGCROSS(J,K,7)AND CROSS(J,A2)AND A2<30 AND A2>1日前的A2,K,'穿三线'),画洋红色

DRAWTEXT(84上穿A4AND K上穿A4,90,'虎口'),COLOR00FF00

A10:=MA((A0-MA(A0,13))/(0.15*AVEDEV(A0,13)),3)

DRAWICON(A10上穿-15AND J>1日前的J,5,1)

DRAWICON(20上穿A10,100,2)

IF(K<1日前的K,K,DRAWNULL),画绿色, 线宽为1

IF(D<1日前的D,D,DRAWNULL),画绿色, 线宽为1

IF(J<1日前的J,J,DRAWNULL),COLORFFFF00, 线宽为1

IF(K>1日前的K,K,DRAWNULL),画红色, 线宽为1

IF(D>1日前的D,D,DRAWNULL),画红色, 线宽为1

IF(J>1日前的J,J,DRAWNULL),COLORFF00FF, 线宽为1

{掘底买点}
WVAR1赋值:(最高价+最低价+收盘价)/3

WVAR2赋值:(WVAR1-WVAR1的14日简单移动平均)/(0.015*AVEDEV(WVAR1,14))

WVAR3赋值:IF(TROUGHBARS(3,16,1)=0 AND 最高价>最低价+0.04,80,0)

WVAR4赋值:IF(ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3),50,0)
当满足条件WVAR3时,在80和95之间画柱状线
当满足条件WVAR3时,在50和80之间画柱状线
当满足条件WVAR3时,在50和80之间画柱状线
当满足条件WVAR3时,在50和80之间画柱状线
当满足条件WVAR3时,在50和80之间画柱状线
当满足条件WVAR3时,在20和50之间画柱状线
当满足条件WVAR3时,在20和50之间画柱状线
当满足条件WVAR3时,在20和50之间画柱状线
当满足条件WVAR3时,在20和50之间画柱状线
当满足条件WVAR4时,在50和65之间画柱状线
当满足条件WVAR4时,在30和50之间画柱状线
当满足条件WVAR4时,在30和50之间画柱状线
当满足条件WVAR4时,在30和50之间画柱状线
当满足条件WVAR4时,在30和50之间画柱状线
当满足条件WVAR4时,在10和30之间画柱状线
当满足条件WVAR4时,在10和30之间画柱状线
当满足条件WVAR4时,在10和30之间画柱状线
当满足条件WVAR4时,在10和30之间画柱状线

掘底买点赋值:WVAR3,画黄色, 线宽为2

黑码信号赋值:WVAR4,画红色, 线宽为2
当满足条件WVAR2<-110 AND WVAR3>0时,在87和'▲山人B点'位置书写文字
当满足条件WVAR2<-110 AND WVAR4>0时,在57和'▲山人黑码'位置书写文字

 

指标安装下载帮助  |   联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:指标公式网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图