最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信完美三重解盘副图源码

    正文概述    2024-04-13 20:29:27  

    重解盘,原是大智慧的一个非常不错的副图指标,它由图形和文字两部分组成,对指导我们操作股票特别是及时逃顶很有帮助。对此大家可能都很熟悉了,我就不多讲了。
    过去也有很多人发过通达信版的三重解盘(有时名称不同),不过因为软件本身的原因,一直都不能很好地在通达信上同时表现出指标的文字提示功能和一些有关数字的显示。
    现在终于通达信也有了DRAWTEXT_FIX和DRAWNUMBER_FIX这两个用来定点书写文字和数字的公式指标。
    于是我就有了机会尝试用这两个新指标把大智慧的三重解盘完美地再现在了通达信软件上。
    上图、上源码:


    {三重解盘}
    VAR1:=(VOL / (((HIGH - LOW) * 2) - ABS((CLOSE - OPEN))));
    成交:=VOL;
    买盘:=IF((CLOSE > OPEN),(VAR1 * (HIGH - LOW)),IF((CLOSE < OPEN),(VAR1 * ((HIGH - OPEN) + (CLOSE - LOW))),(VOL / 2)));
    卖盘:=IF((CLOSE > OPEN),(0 - (VAR1 * ((HIGH - CLOSE) + (OPEN - LOW)))),IF((CLOSE < OPEN),(0 - (VAR1 * (HIGH - LOW))),(0 - (VOL / 2))));
    买卖差:=(买盘 + 卖盘);

    量比1:=(VOL / MA(VOL,5));
    VAR10:=买盘;
    VAR20:=卖盘;
    JX1:=BARSSINCE(买盘);
    JY1:=IF(((121 > JX1) AND (JX1 > 0)),JX1,120);
    JY2:=IF(((4 > JX1) AND (JX1 > 0)),JX1,3);
    VAR30:=MA(VOL,JY2);
    动神:=买盘;
    鬼力:=VAR20;
    神比:=(动神 / VAR30);
    鬼比:=(鬼力 / VAR30);
    VAR2:=(HIGH - LOW);
    VAR3:=ABS((OPEN - CLOSE));
    VAR4:=(HIGH - IF((CLOSE > OPEN),CLOSE,OPEN));
    VAR5:=(IF((CLOSE > OPEN),OPEN,CLOSE) - LOW);
    VAR6:=((VAR3 / VAR2) * VOL);
    VAR7:=((VAR4 / VAR2) * VOL);
    VAR8:=((VAR5 / VAR2) * VOL);
    VAR9:=IF(((VOL / CAPITAL) > 0.001),1,EXP(ABS(LOG(((VOL / CAPITAL) * 100)))));

    VARA:=(((CLOSE - MA(CLOSE,5)) / MA(CLOSE,5)) * 100);
    VARB:=(((MA(CLOSE,5) > MA(CLOSE,10)) AND (MA(CLOSE,10) > MA(CLOSE,30))) AND (MA(CLOSE,30) > MA(CLOSE,60)));
    VARC:=((MA(CLOSE,5) < MA(CLOSE,10)) AND (MA(CLOSE,10) < MA(CLOSE,30)));
    VARD:=REF(CLOSE,1);
    VARE:=((SMA(MAX((CLOSE - VARD),0),6,1) / SMA(ABS((CLOSE - VARD)),6,1)) * 100);
    VAR40:=((IF((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)),VAR6,动神) + 动神) / 2);
    VAR41:=((IF(((VAR7 > VAR6) AND (VAR7 > VAR8)),VAR7,动神) + 动神) / 2);
    VAR42:=((IF(((VAR8 > VAR6) AND (VAR8 > VAR7)),VAR8,动神) + 动神) / 2);
    VAR50:=((IF((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE < OPEN)),VAR6,鬼力) + 鬼力) / 2);
    三日上攻:MA((((VAR40 + VAR41) + VAR42) / 3),JY2),NODRAW;
    三日下攻:MA(VAR50,JY2),NODRAW;
    多头:STICKLINE((CLOSE > MA(CLOSE,30)),0,VOL,3,1),COLOR0000FF;
    空头:STICKLINE((CLOSE < MA(CLOSE,30)),0,VOL,3,1),COLOR00FF00;
    STICKLINE((鬼力 > 0),鬼力,0,4,0),COLORFF3399;
    加仓:STICKLINE((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)),0,VAR6,2.5,0),COLOR00FFFF;
    减仓:STICKLINE((((VAR6 >= VAR7) AND (VAR6 >= VAR8)) AND (CLOSE < OPEN)),0,VAR6,2.5,0),COLORFF0000;
    洗盘:STICKLINE(((VAR8 > VAR6) AND (VAR8 > VAR7)),0,VAR8,2.5,0),COLORFFFFFF;
    高卖:STICKLINE(((VAR7 > VAR6) AND (VAR7 > VAR8)),0,VAR7,2.5,0),COLORFF00FF;
    相对地量:=STICKLINE(((VAR9 > 2) AND (VOL < (MA(VOL,5) / 2))),0,VOL,3,0);

    STICKLINE((买卖差 > 0),0,买卖差,1,0),COLOR0000FF;
    STICKLINE((买卖差 < 0),0,买卖差,2,0),COLOR33FF33;

    STICKLINE(REFDATE(V,DATE),REFDATE(V,DATE),REFDATE(V,DATE),6,1),COLORWHITE;

    DRAWTEXT_FIX(1,0.715,0.01,0,'★【操作解盘】 注意:巨量有绿色下部(负交易量)时,说明有主力出逃!!★'),COLORRED;
    DRAWTEXT_FIX(1,0.715,0.05,0,'★黄色烛,红芯长;庄家进货强,俺也进货等起航!!★'),COLOR00FFFF;
    DRAWTEXT_FIX(1,0.715,0.09,0,'★粉色烛,红芯长,庄家高抛低吸操作忙,俺也去逐浪!!★'),COLORFF00FF;
    DRAWTEXT_FIX(1,0.715,0.13,0,'★白色烛,红芯长,庄家洗盘找底在振荡,俺也伺机建点仓!!★'),COLORFFFFFF;
    DRAWTEXT_FIX(1,0.715,0.17,0,'★巨量绿,蓝烛长,趋势破,急离场;等着跌,莫手痒!!★'),COLOR00FF00;
    DRAWTEXT_FIX(1,0.715,0.21,0,'★蓝色烛,红芯短,巨量绿尾长,庄家拉高在退场,俺也趁机减点仓!!★'),COLORFFFF00;

    DRAWTEXT_FIX(1,0.01,0.01,0,'【买卖盘解量(手)】'),COLORRED;
    DRAWTEXT_FIX(1,0.01,0.05,0,'┃当日买卖量='),COLOR00FFFF;
    DRAWTEXT_FIX(1,0.01,0.09,0,'┃当日主动买量='),COLORFF00FF;
    DRAWTEXT_FIX(1,0.01,0.13,0,'┃当日主动卖量='),COLORFFFFFF;
    DRAWTEXT_FIX(1,0.01,0.17,0,'┃当日买卖比='),COLOR00FF00;
    DRAWTEXT_FIX(1,0.01,0.21,0,'┃买入资金累计万元: '),COLOR00FFFF;
    DRAWTEXT_FIX(1,0.01,0.26,0,'┃卖出资金累计万元: '),COLORRED;

    AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE 主动卖盘:=IF(CLOSE>OPEN,AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE 买卖比:=主动买盘/主动卖盘;
    WJ:=(HIGH+LOW+CLOSE)/3;
    VD1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
    VD2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-WJ);
    VD3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
    VD4:=IF(HIGH=LOW,1,WJ-MIN(CLOSE,OPEN));
    VD5:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
    VD6:=(VD1*VD5);
    VD7:=(VD2*VD5);
    VD8:=(VD3*VD5);
    VD9:=(VD4*VD5);
    买入量:=(VD9+VD8);
    卖出量:=(VD6+VD7);
    买入资金:=买入量*CLOSE/100;
    卖出资金:=卖出量*CLOSE/100;

    DRAWNUMBER_FIX(1,0.07,0.05,0,CONST(VOL)),COLOR00FFFF;
    DRAWNUMBER_FIX(1,0.08,0.09,0,CONST(主动买盘)),COLORFF00FF;
    DRAWNUMBER_FIX(1,0.08,0.13,0,CONST(主动卖盘)),COLORFFFFFF;
    DRAWNUMBER_FIX(1,0.073,0.17,0,CONST(买卖比)),COLOR00FF00;
    DRAWNUMBER_FIX(1,0.095,0.21,0,CONST(买入资金)),COLOR00FFFF;
    DRAWNUMBER_FIX(1,0.095,0.26,0,CONST(卖出资金)),COLORRED;

    MA5:MA(V,5),COLORWHITE,LINETHICK2;
    MA13:MA(V,13),COLORRED,LINETHICK2;
     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信完美三重解盘副图源码 加入收藏