最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信,主图上画出区间顶底与均线的指标

    正文概述    2024-04-14 15:08:55  

    通达信主图上画出区间顶底与均线的指标

    {量能平台}
    HSL:=100*VOL/(FINANCE(7)/100);
    MA3:=MA(C,M1);
    T移动:=CONST(HHVBARS(MA(HSL,1),N1));
    移动量能平台:IF(CURRBARSCOUNT<=N1+1,CONST(IF(T移动=0,MA3,REF(MA3,T移动))),DRAWNULL),
    COLORYELLOW;
    IF(CURRBARSCOUNT=T移动+1,移动量能平台,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK2;
    TTJ10:=BARSLAST((MA(HSL,M1)=HHV(MA(HSL,M1),10))),NODRAW;
    K10:=TTJ10=0;
    P10:=SUMBARS(K10,1),NODRAW;
    ABA10:STICKLINE(P10<=1100,REF(MA3,P10-1)*1.001,REF(MA3,P10-1),0.5,0),COLORWHITE;
    TTJ30:=BARSLAST((MA(V,M1)=HHV(MA(V,M1),30))),NODRAW;
    K30:=TTJ30=0;
    P30:=SUMBARS(K30,1),NODRAW;
    ABA30:STICKLINE(P30<=1100,REF(MA3,P30-1)*1.0005,REF(MA3,P30-1),0.5,0),COLORYELLOW;
    {区间均线}
    加权均线:=(H+L+3*O+8*C)/13,COLORYELLOW,NODRAW;
    MM:=(Y低-1900)*10000+M低*100+D低;
    区间时间低:=(BARSLASTCOUNT(DATE>MM)+1),NODRAW;
    A:=MA(加权均线,区间时间低);
    低点均线:IF(区间时间低>1,A,DRAWNULL),COLORRED,LINETHICK2;
    T低:=CONST(REF(L,区间时间低-1));
    DRAWTEXT(L=T低,L,'↑起点'),COLORRED;

    MM1:=(Y高-1900)*10000+M高*100+D高;
    区间时间高:=(BARSLASTCOUNT(DATE>MM1)+1),NODRAW;
    B:=MA(加权均线,区间时间高);
    高点均线:IF(区间时间高>1,B,DRAWNULL),COLORGREEN,LINETHICK2;
    T高:=CONST(REF(H,区间时间高-1));
    DRAWTEXT(H=T高,H,'↓起点'),COLORGREEN;

    MM2:=(Y-1900)*10000+M*100+D;
    区间时间:=(BARSLASTCOUNT(DATE>MM2)+1),NODRAW;
    D:=MA(加权均线,区间时间);
    区间均线:IF(区间时间>1,D,DRAWNULL),COLORYELLOW,LINETHICK2;
    T001:=CONST(REF(H,区间时间-1));
    DRAWTEXT(H=T001,H,'↓起点'),COLORYELLOW;

    {测顶底部}
    顶系数:(1+3*顶系数数/100),NODRAW;
    底系数:(1+3*底系数数/100),NODRAW;
    阶段高点:CONST(HHV(H,测底)),COLORYELLOW;
    阶段低点:CONST(LLV(L,测顶)),COLORYELLOW;
    测顶部:阶段低点*顶系数,COLORGREEN,DOTLINE;
    测底部:阶段高点/底系数,COLORMAGENTA,DOTLINE;
    DRAWTEXT_FIX(C>0,0.90,0.001,1,'测顶部:'),COLORGREEN,LINETHICK5;
    DRAWNUMBER_FIX(C>0,0.902,0.001,0,CONST(测顶部)),COLORGREEN,LINETHICK5;
    DRAWTEXT_FIX(C>0,0.90,0.05,1,'测底部:'),COLORMAGENTA,LINETHICK5;
    DRAWNUMBER_FIX(C>0,0.902,0.05,0,CONST(测底部)),COLORMAGENTA,LINETHICK5;
    DRAWTEXT_FIX(C>0,0.90,0.1,1,'顶系数:'),COLORMAGENTA,LINETHICK5;
    DRAWNUMBER_FIX(C>0,0.902,0.1,0,CONST(顶系数)),COLORMAGENTA,LINETHICK5;
    DRAWTEXT_FIX(C>0,0.90,0.15,1,'底系数:'),COLORMAGENTA,LINETHICK5;
    DRAWNUMBER_FIX(C>0,0.902,0.15,0,CONST(底系数)),COLORMAGENTA,LINETHICK5;
    {缺口}
    Q:=L>REF(H,1);
    Q1:=H STICKLINE(Q,L,REF(H,1),10,1),COLORRED;
    STICKLINE(Q1,H,REF(L,1),10,2),COLORGREEN;

    Y低(1991,2099,2012)M低(1,12,9)D低(1,31,5)Y高(1991,2099,2012)M高(1,12,6)D高(1,31,18)Y(1991,2099,2012)M(1,12,8)D(1,31,10)
    测底(1,99999,120)测顶(1,99999,60)顶系数数(0,300,2)底系数数(0,300,7)M1(1,5,3)N1(1,99999,5)

    说明:
    1:顶底系数以3%为基数向上类推,顶底系数可以调整;如果指数或股价穿破顶线出现回调,经过整理还会创新高;如果指数或股价穿破底线出现反弹,经过整理还会创新低。
    2:调整时间选择高低点系统自动画出区间、高低均线。
     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信,主图上画出区间顶底与均线的指标 加入收藏