未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
指标源码:
原理解析:
AA赋值:SUM(AMOUNT,C的有效数据周期数)/SUM(成交量*100,C的有效数据周期数)
BB赋值:BETWEEN(C/AA,C+H,C-H)
DRAWICON(ISLASTBAR AND C>1日前的C,C,1)
DRAWICON(ISLASTBAR AND C<1日前的C,C,2)
输出压力:MA(REF(30日内C最高值,1),2),DOTLINE,COLOR8080FF,LINETHICK1
输出支撑:MA(REF(30日内C最低值,1),2),DOTLINE,COLORAAAA00,LINETHICK1
HH赋值:CONST(0日内C最高值)
LL赋值:CONST(0日内C最低值)
HL赋值:HH-LL
输出顶:HH,NODRAW
当满足条件C=HH时,在HH和35之间画图标
当满足条件C=LL时,在LL和34之间画图标
STICKLINE(TIME2=94100 AND REF(C,上次TIME2=94100距今天数)>=REF(C,BARSLAST(TIME2=93100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),画红色
STICKLINE(TIME2=94100 AND REF(C,上次TIME2=94100距今天数)
STICKLINE(TIME2=95100 AND REF(C,上次TIME2=95100距今天数)>=REF(C,BARSLAST(TIME2=94100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),画红色
STICKLINE(TIME2=95100 AND REF(C,上次TIME2=95100距今天数)
STICKLINE(TIME2=100100 AND REF(C,上次TIME2=100100距今天数)>=REF(C,BARSLAST(TIME2=95100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),画红色
STICKLINE(TIME2=100100 AND REF(C,上次TIME2=100100距今天数)
SJ1赋值:TIME2=93100
T1赋值:上次SJ1距今天数
SJ2赋值:TIME2=94100
SJ4赋值:TIME2=95100
T2赋值:上次SJ2距今天数
T4赋值:上次SJ4距今天数
H1赋值:IF(TIME2=94100,T2日前的C,DRAWNULL)=C
H2赋值:IF(TIME2=95100,T4日前的C,DRAWNULL)=C
CS2赋值:CONST(T2日前的C)
CS4赋值:CONST(T4日前的C)
GL2赋值:FILTERX(H1,T2)
GL4赋值:FILTERX(H2,T4)
L1赋值:IF(TIME2=93100,T1日前的C,DRAWNULL)=C
CS1赋值:CONST(T1日前的C)
GL1赋值:FILTERX(L1,T1)
DA赋值:CONST(IF(REF(GL2,上次GL2距今天数),REF(BARSLAST(GL1),上次GL2距今天数),DRAWNULL))
DA1:=CONST(IF(REF(GL4,上次GL4距今天数),REF(BARSLAST(GL2),上次GL4距今天数),DRAWNULL))
A赋值:IF(上次GL1距今天数>=0 AND 上次GL1距今天数<=DA,((CS2-CS1)/DA)*上次GL1距今天数+CS1,DRAWNULL)
B赋值:IF(上次GL2距今天数>=0 AND 上次GL2距今天数<=DA1,((CS4-CS2)/DA1)*上次GL2距今天数+CS2,DRAWNULL)
IF(A>=1日前的A,A,DRAWNULL)COLORLIMAGENTA,LINETHICK3
IF(A<1日前的A,A,DRAWNULL)COLORGREEN,LINETHICK5
IF(B>=1日前的B,B,DRAWNULL)COLORLIMAGENTA,LINETHICK3
IF(B<1日前的B,B,DRAWNULL)COLORGREEN,LINETHICK3
XSJ1赋值:TIME2=95100
XT1赋值:上次XSJ1距今天数
XSJ2赋值:TIME2=100100
XT2赋值:上次XSJ2距今天数
XCS2赋值:CONST(XT2日前的C)
XL1赋值:IF(TIME2=95100,XT1日前的C,DRAWNULL)=C
XH1赋值:IF(TIME2=100100,XT2日前的C,DRAWNULL)=C
XCS1赋值:CONST(XT1日前的C)
XGL1赋值:FILTERX(XL1,XT1)
XGL2赋值:FILTERX(XH1,XT2)
XDA赋值:CONST(IF(REF(XGL2,上次XGL2距今天数),REF(BARSLAST(XGL1),上次XGL2距今天数),DRAWNULL))
XA赋值:IF(上次XGL1距今天数>=0 AND 上次XGL1距今天数<=XDA,((XCS2-XCS1)/XDA)*上次XGL1距今天数+XCS1,DRAWNULL)
IF(XA>=1日前的XA,XA,DRAWNULL)COLORLIMAGENTA,LINETHICK3
IF(XA<1日前的XA,XA,DRAWNULL)COLORGREEN,LINETHICK3
时间赋值:TIME2=100100
N赋值:上次时间距今天数
输出C1:CONST(IF(N,MAX(REF(0日内H最高值,N+1),DYNAINFO(4)),0日内H最高值)),DOTLINE,画红色
输出C2:CONST(IF(N,MIN(REF(0日内L最低值,N+1),DYNAINFO(4)),0日内L最低值)),DOTLINE,COLORGREEN
输出C3:(C1+C2)/2,DOTLINE,COLORYELLOW
VV赋值:0日内V最高值
ZF赋值:(C1/C2-1)*100
DRAWTEXT(CURRBARSCOUNT=2,C1,VARCAT(VARCAT(VARCAT(VARCAT('上限:',VAR2STR(C1,2)),'元,'),VARCAT('振幅:',VAR2STR(ZF,2))),'%')),画红色
DRAWTEXT(CURRBARSCOUNT=2,C3,VARCAT(VARCAT('中限:',VAR2STR(C3,2)),'元')),COLORYELLOW
DRAWTEXT(CURRBARSCOUNT=2,C2,VARCAT(VARCAT('下限:',VAR2STR(C2,2)),'元')),COLORGREEN
DRAWTEXT(C1/C2<=1.03 AND C上穿C1 AND V>=VV,C1*1.005,'★买入')画红色
DRAWTEXT(C1/C2<=1.03 AND C2上穿C AND V>=VV,C2*0.998,'★卖出')COLORGREEN
STICKLINE(C1/C2<1.03 AND C上穿C1 AND V>=VV,DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,1,0),画红色
攻击量赋值:((HSL*0.50+1日前的HSL*0.33)+(2日前的HSL*0.17))*FROMOPEN的C日累和/FROMOPEN
攻击量A赋值:SUM(IF(C>1日前的C,攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0
攻击量B赋值:-SUM(IF(C<1日前的C,攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0
攻击流量赋值:攻击量A+攻击量B,COLORSTICK
攻击比赋值:攻击流量/FROMOPEN的V日累和*100,画红色,LINETHICK1
资金攻击度赋值:IF(攻击比>=0,(攻击比+50),100-(攻击比-50的绝对值))
资金流入赋值:SUM(IF(C>1日前的C,V,0),FROMOPEN),STICK,画红色
资金流出赋值:-SUM(IF(C<1日前的C,V,0),FROMOPEN),STICK,COLOR00FF00
资金出入赋值:资金流入+资金流出,COLORSTICK
资金比赋值:资金出入/FROMOPEN的V日累和*100,COLOR00FFFF,LINETHICK1
资金流量比赋值:IF(资金比>=0,(资金比+100)/2,100-(资金比-100的绝对值/2))
DRAWTEXT_FIX(1,0.250,0.88,0,STRCAT(STRCAT('【资金流量比】',CON2STR(资金流量比,2)),'%买')),COLORCYAN
DRAWTEXT_FIX(1,0.000,0.88,0,STRCAT(STRCAT('【资金攻击度】',CON2STR(资金攻击度,2)),' %买')),COLORCYAN
输出XG:480日内H最高值,DOTLINE,画红色
STICKLINE(FILTER(CROSS(C,1日前的XG),10) AND C>1日前的XG,C*0.99,C,8,0),COLORGREEN
DRAWTEXT(FILTER(CROSS(C,1日前的XG),10) AND C>1日前的XG,C*0.99,'突破'),COLORYELLOW
FF赋值:(C-5日前的C)/5日前的C
STICKLINE(FF>0,DYNAINFO(3),DYNAINFO(3)*(1+FF),0.5,0),画红色
STICKLINE(FF<0,DYNAINFO(3),DYNAINFO(3)*(1+FF),0.5,0),COLORGREEN