老张实用小公式6:妞妞角度线
{妞妞角度线}
AS4:=BACKSET(ISLASTBAR,250);
XC4:STICKLINE(CROSS(AS4,0.5),CONST(HHV(H,120)),CONST(LLV(L,120)),0,-1),COLOR0000B0;
AS3:=BACKSET(ISLASTBAR,120);
XC3:STICKLINE(CROSS(AS3,0.5),CONST(HHV(H,120)),CONST(LLV(L,120)),0,-1),COLOR0000B0;
AS2:=BACKSET(ISLASTBAR,60);
XC2:STICKLINE(CROSS(AS2,0.5),CONST(HHV(H,120)),CONST(LLV(L,120)),0,-1),COLOR0000B0;
AS1:=BACKSET(ISLASTBAR,30);
XC1:STICKLINE(CROSS(AS1,0.5),CONST(HHV(H,120)),CONST(LLV(L,120)),0,-1),COLOR0000B0;
NH:=120;
TB:=HHV(HIGH,NH);
TBT:=HHVBARS(HIGH,NH),COLORCYAN,NODRAW;
TH:BARSLAST(CURRBARSCOUNT=CONST(TBT)+1),COLORCYAN,NODRAW;
NL:=30;
TA:=LLV(LOW,NL);
TAT:=LLVBARS(LOW,NL);
TL:BARSLAST(CURRBARSCOUNT=CONST(TAT)+1),COLORFFAAFF,NODRAW;
NOTEXTH1:DRAWLINE(TH=0,HIGH,ISLASTBAR,REF(HIGH,TBT),0),COLORGREEN;{水平线}
NOTEXTL1:DRAWLINE(TL=0,L,ISLASTBAR,REF(L,TAT),0),COLORGREEN;{水平线}
RX1:DRAWBAND((NOTEXTH1-NOTEXTL1)*0.618+NOTEXTL1,RGB(0,60,60),
(NOTEXTH1-NOTEXTL1)*0.50+NOTEXTL1,RGB(0,0,0));
RX2:DRAWBAND((NOTEXTH1-NOTEXTL1)*0.50+NOTEXTL1,RGB(20,100,30),
(NOTEXTH1-NOTEXTL1)*0.382+NOTEXTL1,RGB(0,0,0));
X06:DRAWTEXT(CURRBARSCOUNT=10,(NOTEXTH1-NOTEXTL1)*0.45+NOTEXTL1,'鱼身下'),COLORYELLOW;
X07:DRAWTEXT(CURRBARSCOUNT=10,(NOTEXTH1-NOTEXTL1)*0.55+NOTEXTL1,'鱼身上'),COLORYELLOW;
KW:DRAWKLINE(H,O,L,C);
NOTEXTH2:DRAWLINE(TH=0,HIGH,ISLASTBAR,TB*(1-TBT*0.01),0),COLORWHITE;
NOTEXTH3:DRAWLINE(TH=0,HIGH,ISLASTBAR,TB*(1-TBT*0.02),0),COLORYELLOW,LINETHICK2;
NOTEXTH4:DRAWLINE(TH=0,HIGH,ISLASTBAR,TB*(1-TBT*0.03),0),COLORWHITE;
NOTEXTH5:=DRAWLINE(TH=0,HIGH,ISLASTBAR,TB*(1-TBT*0.04),0),COLORWHITE;
NOTEXTL2:DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.01),0),COLORWHITE;
NOTEXTL3:DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.02),0),COLORYELLOW,LINETHICK2;
NOTEXTL4:DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.03),0),COLORWHITE;
NOTEXTL5:=DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.04),0),COLORWHITE;
期间跌幅:(NOTEXTL1-NOTEXTH1)/NOTEXTH1*100,COLORWHITE,NODRAW;
NOTEXTD50:=(NOTEXTH1-NOTEXTL1)*0.5+NOTEXTL1,COLORMAGENTA,DOTLINE;
NOTEXTD40:=(NOTEXTH1-NOTEXTL1)*0.382+NOTEXTL1,COLORLIBLUE,DOTLINE;
NOTEXTD60:=(NOTEXTH1-NOTEXTL1)*0.618+NOTEXTL1,COLORLIBLUE,DOTLINE;
NOTEXTD80:(NOTEXTH1-NOTEXTL1)*0.809+NOTEXTL1,COLORLIBLUE,DOTLINE;
NOTEXTD20:(NOTEXTH1-NOTEXTL1)*0.191+NOTEXTL1,COLORLIBLUE,DOTLINE;
鱼身空间:(NOTEXTD60-C)/C*100,COLORYELLOW,NODRAW;
X00:DRAWNUMBER(ISLASTBAR,NOTEXTD60,NOTEXTD60),COLORGREEN;
X01:DRAWTEXT(ISLASTBAR,NOTEXTD80,'80.9%'),COLORLIGRAY;
X02:=DRAWTEXT(ISLASTBAR,NOTEXTD60,'61.8%'),COLORLIGRAY;
X03:=DRAWTEXT(ISLASTBAR,NOTEXTD50,'50%'),COLORLIGRAY;
X04:=DRAWTEXT(ISLASTBAR,NOTEXTD40,'38.2%'),COLORLIGRAY;
X05:DRAWTEXT(ISLASTBAR,NOTEXTD20,'19.1%'),COLORLIGRAY;
ZT:=C>=ZTPRICE(REF(C#DAY,1),0.1) AND C=H;
DT:=C<=DTPRICE(REF(C#DAY,1),0.1) AND C=L;
BA:STICKLINE(ZT,(H+L)/2,CLOSE,0,0),COLORYELLOW;
BC:STICKLINE(DT,(H+L)/2,CLOSE,0,0),COLORBLUE;
DA:=YEAR AND MONTH AND DAY;
AXA:=STRCAT(CON2STR(YEAR,0),'年');
AAB:=STRCAT(CON2STR(MONTH,0),'月');
AA33:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',
IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))));
AA1:=STRCAT(STRCAT(STRCAT(AXA,AAB),STRCAT(AA33,AA4)),'】');
S1:DRAWTEXT_FIX(DA,0,1,0,AA1),COLORGREEN;
TJG:=NOT(NAMELIKE('S') OR NAMELIKE('*S')) AND DYNAINFO(8)>0;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:DYNAINFO
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{妞妞角度线}
AS4赋值:BACKSET(ISLASTBAR,250)
输出XC4:STICKLINE(AS4上穿0.5,CONST(120日内H最高值),CONST(120日内L最低值),0,-1),COLOR0000B0
AS3赋值:BACKSET(ISLASTBAR,120)
输出XC3:STICKLINE(AS3上穿0.5,CONST(120日内H最高值),CONST(120日内L最低值),0,-1),COLOR0000B0
AS2赋值:BACKSET(ISLASTBAR,60)
输出XC2:STICKLINE(AS2上穿0.5,CONST(120日内H最高值),CONST(120日内L最低值),0,-1),COLOR0000B0
AS1赋值:BACKSET(ISLASTBAR,30)
输出XC1:STICKLINE(AS1上穿0.5,CONST(120日内H最高值),CONST(120日内L最低值),0,-1),COLOR0000B0
NH赋值:120
TB赋值:NH日内最高价最高值
TBT:=HHVBARS(最高价,NH),画青色,NODRAW
输出TH:上次CURRBARSCOUNT=CONST(TBT距今天数+1),画青色,NODRAW
NL赋值:30
TA赋值:NL日内最低价最低值
TAT:=LLVBARS(最低价,NL)
输出TL:上次CURRBARSCOUNT=CONST(TAT距今天数+1),COLORFFAAFF,NODRAW
NOTEXTH1:DRAWLINE(TH=0,最高价,ISLASTBAR,TBT日前的最高价,0),画绿色
{水平线}
NOTEXTL1:DRAWLINE(TL=0,L,ISLASTBAR,TAT日前的L,0),画绿色
输出{水平线}
RX1:DRAWBAND((NOTEXTH1-NOTEXTL1)*0.618+NOTEXTL1,RGB(0,60,60),
(NOTEXTH1-NOTEXTL1)*0.50+NOTEXTL1,RGB(0,0,0))
输出RX2:DRAWBAND((NOTEXTH1-NOTEXTL1)*0.50+NOTEXTL1,RGB(20,100,30),
(NOTEXTH1-NOTEXTL1)*0.382+NOTEXTL1,RGB(0,0,0))
输出X06:DRAWTEXT(CURRBARSCOUNT=10,(NOTEXTH1-NOTEXTL1)*0.45+NOTEXTL1,'鱼身下'),画黄色
输出X07:DRAWTEXT(CURRBARSCOUNT=10,(NOTEXTH1-NOTEXTL1)*0.55+NOTEXTL1,'鱼身上'),画黄色
输出KW:DRAWKLINE(H,O,L,C)
NOTEXTH2:DRAWLINE(TH=0,最高价,ISLASTBAR,TB*(1-TBT*0.01),0),画白色
NOTEXTH3:DRAWLINE(TH=0,最高价,ISLASTBAR,TB*(1-TBT*0.02),0),画黄色,LINETHICK2
NOTEXTH4:DRAWLINE(TH=0,最高价,ISLASTBAR,TB*(1-TBT*0.03),0),画白色
NOTEXTH5:=DRAWLINE(TH=0,最高价,ISLASTBAR,TB*(1-TBT*0.04),0),画白色
NOTEXTL2:DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.01),0),画白色
NOTEXTL3:DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.02),0),画黄色,LINETHICK2
NOTEXTL4:DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.03),0),画白色
NOTEXTL5:=DRAWLINE(TL=0,L,ISLASTBAR,TA*(1+TAT*0.04),0),画白色
输出期间跌幅:(NOTEXTL1-NOTEXTH1)/NOTEXTH1*100,画白色,NODRAW
NOTEXTD50赋值:(NOTEXTH1-NOTEXTL1)*0.5+NOTEXTL1,COLORMAGENTA,DOTLINE
NOTEXTD40赋值:(NOTEXTH1-NOTEXTL1)*0.382+NOTEXTL1,COLORLIBLUE,DOTLINE
NOTEXTD60赋值:(NOTEXTH1-NOTEXTL1)*0.618+NOTEXTL1,COLORLIBLUE,DOTLINE
输出NOTEXTD80:(NOTEXTH1-NOTEXTL1)*0.809+NOTEXTL1,COLORLIBLUE,DOTLINE
输出NOTEXTD20:(NOTEXTH1-NOTEXTL1)*0.191+NOTEXTL1,COLORLIBLUE,DOTLINE
输出鱼身空间:(NOTEXTD60-C)/C*100,画黄色,NODRAW
输出X00:DRAWNUMBER(ISLASTBAR,NOTEXTD60,NOTEXTD60),画绿色
当满足条件ISLASTBAR时,在NOTEXTD80和'80.9%'位置书写文字
当满足条件ISLASTBAR时,在NOTEXTD60和'61.8%'位置书写文字
当满足条件ISLASTBAR时,在NOTEXTD50和'50%'位置书写文字
当满足条件ISLASTBAR时,在NOTEXTD40和'38.2%'位置书写文字
当满足条件ISLASTBAR时,在NOTEXTD20和'19.1%'位置书写文字
ZT赋值:C>=ZTPRICE(1日前的C#DAY,0.1) AND C=H
DT赋值:C<=DTPRICE(1日前的C#DAY,0.1) AND C=L
输出BA:STICKLINE(ZT,(H+L)/2,收盘价,0,0),画黄色
输出BC:STICKLINE(DT,(H+L)/2,收盘价,0,0), 画蓝色
DA赋值:YEAR AND MONTH AND DAY
AXA赋值:STRCAT(CON2STR(YEAR,0),'年')
AAB赋值:STRCAT(CON2STR(MONTH,0),'月')
AA33赋值:STRCAT(CON2STR(DAY,0),'日')
AA4赋值:STRCAT('【',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',
IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五',IF(WEEKDAY=6,'六','日')))))))
AA1赋值:STRCAT(STRCAT(STRCAT(AXA,AAB),STRCAT(AA33,AA4)),'】')
当满足条件DA时,在横轴0纵轴1位置书写文字
TJG赋值:NOT(NAMELIKE('S') OR NAMELIKE('*S')) AND DYNAINFO(8)>0