最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信价格波段调整指标公式

    正文概述    2024-04-13 15:50:59  

    {rsi赋值}
    LC:=REF(CLOSE,1);
    RSICLOSE:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(Abs(CLOSE-LC),14,1)*CLOSE;
    LH:=REF(HIGH,1);
    RSI_H:=SMA(MAX(HIGH-LH,0),14,1)/SMA(ABS(HIGH-LH),14,1)*HIGH;
    LL:=REF(LOW,1);
    RSI_L:=SMA(MAX(LOW-LL,0),14,1)/SMA(ABS(LOW-LL),14,1)*LOW;
    RSIHIGH:=MAX(RSICLOSE,MAX(RSI_H,RSI_L));
    RSILOW:=MIN(RSICLOSE,MIN(RSI_H,RSI_L));
    {kd模糊数学化}
    HLJ:=(HHV(RSIHIGH,5)+LLV(RSILOW,5))/2;
    HLC:=HHV(RSIHIGH,5)-LLV(RSILOW,5);
    RSV1:=2*POW((RSICLOSE-LLV(RSILOW,5))/HLC,2);
    RSV2:=1-2*POW((RSICLOSE-HHV(RSIHIGH,5))/HLC,2);
    RSVX:=100*IF(RSICLOSE<=HLJ,RSV1,RSV2);
    RSIK:=SMA(RSVX,3,1)*RSICLOSE;
    RSID:=SMA(RSIK,3,1);
    {正态分布画线}
    RSI_K: IF(CURRBARSCOUNT>30,DRAWNULL,RSIK),COLORWHITE;
    RSI_D: IF(CURRBARSCOUNT>30,DRAWNULL,RSID),COLORBLUE;
    K_UB: IF(CURRBARSCOUNT>30,DRAWNULL,MA(RSIK,21)+2*STDP(RSIK,21)),DOTLINE,COLORYELLOW;
    K_LB: IF(CURRBARSCOUNT>30,DRAWNULL,MA(RSIK,21)-2*STDP(RSIK,21)),DOTLINE,COLORLIGREEN;
    线斜率:=(SLOPE(RSID,3)+SLOPE(RSIK,3))>0 OR crOSS(RSIK,RSID);
    红线条件:=CURRBARSCOUNT<=30 AND 线斜率=1;
    红线:IF(红线条件=1,RSIK,DRAWNULL),COLORRED;
    红线提示1:=IF(红线条件=1 AND 红线条件!=REF(红线条件,1),1,0);
    红线提示2:=IF(红线条件=0 AND 红线条件!=REF(红线条件,1),1,0);
    DRAWICON(红线提示1=1,RSIK,1);
    DRAWICON(红线提示2=1,RSIK,2);
    {大盘风向标}
    DHLJ:=(HHV("999999$HIGH",5)+LLV("999999$LOW",5))/2;
    DHLC:=HHV("999999$HIGH",5)-LLV("999999$LOW",5);
    DRSV1:=2*POW(("999999$CLOSE"-LLV("999999$LOW",5))/DHLC,2);
    DRSV2:=1-2*POW(("999999$CLOSE"-HHV("999999$HIGH",5))/DHLC,2);
    DRSVD:=100*IF("999999$CLOSE"<=DHLJ,DRSV1,DRSV2);
    DPK:=SMA(DRSVD,3,1)*"999999$CLOSE";
    DPD:=SMA(DPK,3,1);
    大风:=(SLOPE(DPD,3)+SLOPE(DPK,3))>0 OR CROSS(DPK,DPD);
    DRAWTEXT_FIX(BARSTATUS=2 AND 大风=1,0.1,0.3,0,'【大 盘 顺 风】'),COLORCYAN;
    DRAWTEXT_FIX(BARSTATUS=2 AND 大风=0,0.1,0.3,0,'【大 盘 无 风 或 逆 风】'),COLORRED;
    DRAWTEXT_FIX(1,0,0,0,'【 大 盘(指数基金) 波 段 指 标 】'),COLORGRAY;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信价格波段调整指标公式 加入收藏