最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信多头盈利+年收益主图指标 源码

    正文概述    2024-04-07 10:36:22  

    A:=5; EC:=INBLOCK('沪深A股'),NODRAW;
    FB:=IF(EC=1,IF(CAPITAL =200000000,A-2,IF(CAPITAL 200000000 AND CAPITAL 20000000,A-1,A)),A-2);
    FS:=IF(EC=1,IF(CAPITAL =200000000,A-1,IF(CAPITAL 200000000 AND CAPITAL 20000000,A,A+1)),A-1);
    LMK:=(LLV(L,REF(HHVBARS(H,14),1)+1))*(1+FB/100);
    BJJ:=IF(CROSS(C,LMK),LMK,0);
    YBN:=BARSLAST(BJJ 0 OR BARSCOUNT(C)=1);
    HMK:=HHV(H,YBN+1)*(1-FS/100);
    SJJ:=IF(CROSS(HMK,C),HMK,IF(REF(YBN,1)=0 AND REF(HMK,1) C,O,0));
    YSN:=BARSLAST(SJJ 0 OR BARSCOUNT(C)=1);
    EX11:=HHV(BJJ 0,YSN+1);
    REE:=IF(BARSCOUNT(C)=1,0,REF(EX11,1));
    YBJ:=IF(EX11 REE,BJJ,0),LINETHICK1,COLOR0088FF;
    YSJ:=IF(EX11 REE,SJJ,0),LINETHICK1,COLOR00FF00;
    PE:=IF(EX11=0,LMK,-HMK),NODRAW;

    NBJ:=YBJ; NSJ:=YSJ;
    BAR:=HHV(NBJ 0,0); X0:=SUM(BAR,0);
    BN:=BARSLAST(NBJ
    SN:=BARSLAST(NSJ
    EX10:=HHV(NBJ,SN+1);
    RE:=IF(BARSCOUNT(C)=1,0,REF(EX10,1));
    BBJ:=IF(EX10 RE,NBJ,0); SSJ:=IF(EX10 RE,NSJ,0);
    RBJ:=REF(BBJ,BN);
    BSYL:=100*(IF(SSJ=0,C,SSJ)*0.997/RBJ/1.003-1);{佣金费率}

    DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
    M0:MA(L,5),COLOR00FFFF;
    预警:IF(BBJ 0,BBJ,IF(SSJ 0,SSJ,ABS(PE))),NODRAW;

    多头盈利:BSYL,NODRAW;
    BJ:=IF(BBJ 0,BBJ,DRAWNULL),NODRAW;
    SJ:=IF(SSJ 0,SSJ,DRAWNULL),NODRAW;

    DRAWICON(BJ 0,LLV(L,5),23);
    DRAWICON(SJ 0 AND BSYL 0,H,2),DRAWABOVE;
    DRAWICON(SJ 0 AND BSYL 0 AND BSYL 5,H,8),DRAWABOVE;
    DRAWICON(SJ 0 AND BSYL 5,H,9),DRAWABOVE;
    DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
    QQ:=1000000;
    信号K%:=(X0 100)*100*SUM(SSJ 0,0)/X0,NODRAW;
    卖次:SUM(SSJ 0,0),NODRAW;
    成功率:=(卖次 10)*100*SUM(BSYL*(SSJ 0) 0,0)/卖次,NODRAW;
    股数:=100*INTPART(QQ/RBJ/1.003/100),NODRAW;
    差额:=(SSJ 0)*(SSJ*0.997-RBJ*1.003)*股数,NODRAW;
    总盈利率:=100*SUM(差额,0)/QQ;
    DA0:=HHV(IF(BARSCOUNT(C)=1,DATE,0),0);
    年:=(DATETODAY(DATE)-DATETODAY(DA0))/365,NODRAW;
    年收益:(年 =1)*总盈利率/年,NODRAW;

    KKT:=STRCAT('计算',CON2STR(TOTALBARSCOUNT,0));
    YE:=STRCAT('K线=',CON2STR(年,2));
    SY:=STRCAT('年 收益 ',CON2STR(总盈利率,1));
    SY2:=STRCAT('%(+',STRCAT(CON2STR((PE 0)*BSYL,1),')'));
    百K:=STRCAT('% 信号 ', CON2STR(信号K%,1));
    CG:=STRCAT('%K 成功率 ',CON2STR(成功率,1));

    TX:=STRCAT(KKT,STRCAT(YE,STRCAT(SY,STRCAT(SY2,STRCAT(百K,CG)))));
    DRAWTEXT_FIX(ISLASTBAR,0.0,1,0,TX),COLOR00FFFF;



    通达信多头盈利+年收益主图指标 源码


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信多头盈利+年收益主图指标 源码 加入收藏