邱之分时早盘强弱立判分时支撑线、突破线买入提示通达信公式 分时主图 源码附图
AF1:=1;
TT:=BARSLAST(HOUR=9 AND MINUTE=(30+AF1))+1;
均价:=AMOUNT/VOL/100,COLORYELLOW;
价位:=C,COLORWHITE,LINETHICK4;
盘整:=IF(HOUR>9 AND RANGE(HHV(C,60)/LLV(C,60),1,1.02),C,DRAWNULL),COLORRED,LINETHICK2;
V1:=V;
HH:=C>REF(C,1) AND C/均价>(1+0.03);
LL:=C<REF(C,1) AND C/均价<(1-0.03);
HH1:=CROSS(SUM(HH,0),0.5);
LL1:=CROSS(SUM(LL,0),0.5);
SS1:=SUM(HH1,0)*CROSS(COUNT(C<REF(C,1),BARSLAST(HH1)),0.5);
BB1:=SUM(LL1,0)*CROSS(COUNT(C>REF(C,1),BARSLAST(LL1)),0.5);
XS1:CONST(SUM(IF(SS1,REF(C,1),DRAWNULL),0)),COLORGREEN,LINETHICK2;
CB1:CONST(SUM(IF(BB1,REF(C,1),DRAWNULL),0)),COLORMAGENTA,LINETHICK2;
HH2:=CROSS(SUM(HH AND C>XS1*1.03,0),0.5);
LL2:=CROSS(SUM(LL AND C<CB1*0.97,0),0.5);
SS2:=SUM(HH2,0)*CROSS(COUNT(C<REF(C,1),BARSLAST(HH2)),0.5);
BB2:=SUM(LL2,0)*CROSS(COUNT(C>REF(C,1),BARSLAST(LL2)),0.5);
XS2:CONST(SUM(IF(SS2,REF(C,1),DRAWNULL),0)),COLORGREEN,LINETHICK1;
XB2:CONST(SUM(IF(BB2,REF(C,1),DRAWNULL),0)),COLORMAGENTA,LINETHICK1;
STICKLINE(TIME2=94100 AND REF(C,BARSLAST(TIME2=94100))>=REF(C,BARSLAST(TIME2=93100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),COLORRED;
STICKLINE(TIME2=94100 AND REF(C,BARSLAST(TIME2=94100))<REF(C,BARSLAST(TIME2=93100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),COLORGREEN;
STICKLINE(TIME2=95100 AND REF(C,BARSLAST(TIME2=95100))>=REF(C,BARSLAST(TIME2=94100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),COLORRED;
STICKLINE(TIME2=95100 AND REF(C,BARSLAST(TIME2=95100))<REF(C,BARSLAST(TIME2=94100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),COLORGREEN;
STICKLINE(TIME2=100100 AND REF(C,BARSLAST(TIME2=100100))>=REF(C,BARSLAST(TIME2=95100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),COLORRED;
STICKLINE(TIME2=100100 AND REF(C,BARSLAST(TIME2=100100))<REF(C,BARSLAST(TIME2=95100)),DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0.5,-1),COLORGREEN;
SJ1:=TIME2=93100;T1:=BARSLAST(SJ1);SJ2:=TIME2=94100;
SJ4:=TIME2=95100;T2:=BARSLAST(SJ2);T4:=BARSLAST(SJ4);
HS1:=IF(TIME2=94100,REF(C,T2),DRAWNULL)=C;
H2:=IF(TIME2=95100,REF(C,T4),DRAWNULL)=C;
CS2:=CONST(REF(C,T2));
CS4:=CONST(REF(C,T4));
GL2:=FILTERX(HS1,T2);
GL4:=FILTERX(H2,T4);
LS1:=IF(TIME2=93100,REF(C,T1),DRAWNULL)=C;
CS1:=CONST(REF(C,T1));
GL1:=FILTERX(LS1,T1);
DA:=CONST(IF(REF(GL2,BARSLAST(GL2)),REF(BARSLAST(GL1),BARSLAST(GL2)),DRAWNULL));
DA1:=CONST(IF(REF(GL4,BARSLAST(GL4)),REF(BARSLAST(GL2),BARSLAST(GL4)),DRAWNULL));
A:=IF(BARSLAST(GL1)>=0 AND BARSLAST(GL1)<=DA,((CS2-CS1)/DA)*BARSLAST(GL1)+CS1,DRAWNULL);
B:=IF(BARSLAST(GL2)>=0 AND BARSLAST(GL2)<=DA1,((CS4-CS2)/DA1)*BARSLAST(GL2)+CS2,DRAWNULL);
{IF(A>=REF(A,1),A,DRAWNULL)COLORLIMAGENTA,LINETHICK3;
IF(A<REF(A,1),A,DRAWNULL)COLORGREEN,LINETHICK5;
IF(B>=REF(B,1),B,DRAWNULL)COLORLIMAGENTA,LINETHICK3;
IF(B<REF(B,1),B,DRAWNULL)COLORGREEN,LINETHICK3;}
XSJ1:=TIME2=95100;
XT1:=BARSLAST(XSJ1);
XSJ2:=TIME2=100100;
XT2:=BARSLAST(XSJ2);
XCS2:=CONST(REF(C,XT2));
XL1:=IF(TIME2=95100,REF(C,XT1),DRAWNULL)=C;
XH1:=IF(TIME2=100100,REF(C,XT2),DRAWNULL)=C;
XCS1:=CONST(REF(C,XT1));
XGL1:=FILTERX(XL1,XT1);
XGL2:=FILTERX(XH1,XT2);
XDA:=CONST(IF(REF(XGL2,BARSLAST(XGL2)),REF(BARSLAST(XGL1),BARSLAST(XGL2)),DRAWNULL));
XA:=IF(BARSLAST(XGL1)>=0 AND BARSLAST(XGL1)<=XDA,((XCS2-XCS1)/XDA)*BARSLAST(XGL1)+XCS1,DRAWNULL);
{IF(XA>=REF(XA,1),XA,DRAWNULL)COLORLIMAGENTA,LINETHICK3;
IF(XA<REF(XA,1),XA,DRAWNULL)COLORGREEN,LINETHICK3;}
时间:=TIME2=100100;
N:=BARSLAST(时间);
C1:CONST(IF(N,MAX(REF(HHV(H,0),N+1),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORRED;
C2:CONST(IF(N,MIN(REF(LLV(L,0),N+1),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORGREEN;
C3:(C1+C2)/2,DOTLINE,COLORYELLOW;
VV:=HHV(V,0);
ZF:=(C1/C2-1)*100;
DRAWTEXT(CURRBARSCOUNT=2,C1,VARCAT(VARCAT(VARCAT(VARCAT('天:',VAR2STR(C1,2)),'元,'),VARCAT('振幅:',VAR2STR(ZF,2))),'%')),COLORRED;
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 CROSS(C,C1) AND V>=VV,C1*1.005,'★买入')COLORRED;
DRAWTEXT(C1/C2<=1.03 AND CROSS(C2,C) AND V>=VV,C2*0.998,'★卖出')COLORGREEN;
{STICKLINE(C1/C2<1.03 AND CROSS(C,C1) AND V>=VV,DYNAINFO(3)*1.03,DYNAINFO(3)*0.97,0,0),COLORRED;}
市值Z:=STRCAT(STRCAT(' 市值Z: ',CON2STR(FINANCE(46)/100000000*C,2)),'亿');
DRAWTEXT_FIX(ISLASTBAR,0.2,1,0,市值Z),COLOR0080FF;
DRAWTEXT_FIX(ISLASTBAR,0.4,1,0,HYBLOCK),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.05,1,0,DYBLOCK),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.55,1,0,GNBLOCK),COLORYELLOW;{在屏幕左上角显示所属地域板块};
{竞价情况}
JJCJL:=DYNAINFO(15)/DYNAINFO(4)/100;
JJJEDW:=IF(DYNAINFO(15)>10000,'万元','元');
JJJE:=IF(DYNAINFO(15)>10000,CON2STR(DYNAINFO(15)/10000,1),CON2STR(DYNAINFO(15),1));
JJJE1:=STRCAT(JJJE,JJJEDW);
JJ:=STRCAT('竞价量额:',STRCAT(CON2STR(JJCJL/10000,2),'万手'));
JJ1:=STRCAT(JJ,' = ');
DRAWTEXT_FIX(1,0.7,0.65,0,STRCAT(JJ1,JJJE1))COLORMAGENTA;{竞价量额位置}
{DRAWTEXT_FIX(1,0.95,0.50,0,STRCAT('占昨成交:',STRCAT(CON2STR(DYNAINFO(15)/分时引用.昨日额#DAY*100,2),'%')))COLORYELLOW;}
今日竞价股数:=DYNAINFO(15)/DYNAINFO(4);
{ZSPJ:=分时引用JIN.ZSP#DAY;
AA:=今日竞价股数/FINANCE(46)*10000*(O-ZSPJ)/ZSPJ;};
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
AF1赋值:1
TT赋值:上次HOUR=9 AND MINUTE=(30+AF1距今天数)+1
均价赋值:AMOUNT/成交量/100,COLORYELLOW
价位赋值:C,画白色,LINETHICK4
盘整赋值:IF(HOUR>9 AND RANGE(60日内C最高值/60日内C最低值,1,1.02),C,DRAWNULL),画红色,LINETHICK2
V1赋值:V
HH赋值:C>1日前的C AND C/均价>(1+0.03)
LL赋值:C<1日前的C AND C/均价<(1-0.03)
HH1:=CROSS(0的HH日累和,0.5)
LL1:=CROSS(0的LL日累和,0.5)
SS1赋值:0的HH1日累和*CROSS(COUNT(C<1日前的C,上次HH1距今天数),0.5)
BB1赋值:0的LL1日累和*CROSS(COUNT(C>1日前的C,上次LL1距今天数),0.5)
输出XS1:CONST(SUM(IF(SS1,1日前的C,DRAWNULL),0)),COLORGREEN,LINETHICK2
输出CB1:CONST(SUM(IF(BB1,1日前的C,DRAWNULL),0)),COLORMAGENTA,LINETHICK2
HH2:=CROSS(0的HH AND C>XS1*1.03日累和,0.5)
LL2:=CROSS(0的LL AND C
SS2赋值:0的HH2日累和*CROSS(COUNT(C<1日前的C,上次HH2距今天数),0.5)
BB2赋值:0的LL2日累和*CROSS(COUNT(C>1日前的C,上次LL2距今天数),0.5)
输出XS2:CONST(SUM(IF(SS2,1日前的C,DRAWNULL),0)),COLORGREEN,LINETHICK1
输出XB2:CONST(SUM(IF(BB2,1日前的C,DRAWNULL),0)),COLORMAGENTA,LINETHICK1
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距今天数
HS1赋值: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(HS1,T2)
GL4赋值:FILTERX(H2,T4)
LS1赋值:IF(TIME2=93100,T1日前的C,DRAWNULL)=C
CS1赋值:CONST(T1日前的C)
GL1赋值:FILTERX(LS1,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,0,0),画红色
}
市值Z:=STRCAT(STRCAT(' 市值Z: ',CON2STR(FINANCE(46)/100000000*C,2)),'亿')
当满足条件ISLASTBAR时,在横轴0.2纵轴1位置书写文字
当满足条件ISLASTBAR时,在横轴0.4纵轴1位置书写文字
当满足条件ISLASTBAR时,在横轴0.05纵轴1位置书写文字
当满足条件ISLASTBAR时,在横轴0.55纵轴1位置书写文字
{在屏幕左上角显示所属地域板块}
{竞价情况}
JJCJL赋值:DYNAINFO(15)/DYNAINFO(4)/100
JJJEDW赋值:IF(DYNAINFO(15)>10000,'万元','元')
JJJE赋值:IF(DYNAINFO(15)>10000,CON2STR(DYNAINFO(15)/10000,1),CON2STR(DYNAINFO(15),1))
JJJE1:=STRCAT(JJJE,JJJEDW)
JJ赋值:STRCAT('竞价量额:',STRCAT(CON2STR(JJCJL/10000,2),'万手'))
JJ1:=STRCAT(JJ,' = ')
DRAWTEXT_FIX(1,0.7,0.65,0,STRCAT(JJ1,JJJE1))COLORMAGENTA
{竞价量额位置}
{DRAWTEXT_FIX(1,0.95,0.50,0,STRCAT('占昨成交:',STRCAT(CON2STR(DYNAINFO(15)/分时引用.昨日额#DAY*100,2),'%')))COLORYELLOW
}
今日竞价股数赋值:DYNAINFO(15)/DYNAINFO(4)
{ZSPJ赋值:分时引用JIN.ZSP#DAY
AA赋值:今日竞价股数/FINANCE(46)*10000*(O-ZSPJ)/ZSPJ
}