最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 飞狐天地量显示数字的指标

    正文概述    2024-04-14 07:59:19  

    九毛八公式指标

    公式模块:

    把下面的指标组合装入飞狐后,只显示天量的数字,而天地量的颜色没有了,我想请老师帮忙修改指标,天地量上既要有颜色也要显示出换手率数值.

    一,指标原码参考
    M1------------------------------5
    M2------------------------------60

    volUME:VOL,VOLSTICK;
    周换:SUM(V/CAPITAL*100,5),COLOR00FFFF;
    VOL,VOLSTICK;
    AA:=SUMBARS(VOL,CAPITAL);
    地量:IF(CAPITAL=0,AMOUNT=LLV(AMOUNT,34),VOL<MA(VOL,AA)/3) ,LINETHICK0;
    STICKLINE(地量,VOL,0,7,0),COLORYELLOW;
    天量:IF(CAPITAL=0,AMOUNT=HHV(AMOUNT,34),VOL>MA(VOL,AA)*3) ,LINETHICK0,COLORFF0000;
    STICKLINE(天量,VOL,0,7,0),COLORFF0000;
    MAVOL1:MA(VOLUME,M1);
    MAVOL2:MA(VOLUME,M2),COLORFFF000,LINETHICK2;

    {加到自用的成交量公式前面}
    {⑤%:CAPITAL*5/100,linedot,colorgray;}
    交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
    if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
    if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
    日期差:=DATEDIFF(DATE,CURRENTDATE);
    预测量:IF(BARSTATUS=2 and 日期差=0,VOL/交易分钟数*240,VOL),COLOR00FFFF,LINETHICK0;
    {预测量2:IF(BARSTATUS=2,VOL*240/OPENMINUTES(CURRENTTIME),VOL),COLOR00FF00,LINETHICK0;}
    STICKLINE(BARSTATUS=2,vol,预测量,7,1),COLOR00FFFF,POINTDOT;
    A3:(HHV(VOLUME,60)+HHV(VOLUME,30))*0.52;
    A2:(HHV(VOLUME,60)+HHV(VOLUME,30))*0.55;
    B1:(LLV(VOLUME,60)+LLV(VOLUME,30))*0.45;
    B2:(LLV(VOLUME,60)+LLV(VOLUME,30))*0.55;

    sy1:=SYSPARAM(2);
    sy2:=SYSPARAM(3);
    sy:=(barpos>=sy1 and barpos<=sy2);
    v,volstick;
    vv:v*sy linethick;
    vv:=hhv(v*sy,0);
    hsl:=v/capital*100;
    drawnumber(v=vv[datacount],v,hsl,1) color4d4dff shift1;
    A:INDEXC;
    A0:=barssince(INDEXV>0)+1;
    A1:sum(a*INDEXV,a0)/sum(INDEXV,a0);

    二,修改要求
    1,地量出现用黄色表示并显示换手率数值
    2,天量出现用藏蓝色表示并显示换手率数值
    3,天量线能否用虚线显示


    AA:=SUMBARS(VOL,CAPITAL);
    地量:IF(CAPITAL=0,AMOUNT=LLV(AMOUNT,34),VOL<MA(VOL,AA)/3) ,LINETHICK0;
    STICKLINE(地量,VOL,0,7,0),COLORYELLOW;
    天量:IF(CAPITAL=0,AMOUNT=HHV(AMOUNT,34),VOL>MA(VOL,AA)*3) ,LINETHICK0,COLORFF0000;
    STICKLINE(天量,VOL,0,7,0),COLORFF0000;
    MAVOL1:MA(VOLUME,M1);
    MAVOL2:MA(VOLUME,M2),COLORFFF000,LINETHICK2;

    {加到自用的成交量公式前面}
    {⑤%:CAPITAL*5/100,linedot,colorgray;}
    交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
    if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
    if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
    日期差:=DATE%&&&&&%(DATE,CURRENTDATE);
    预测量:IF(BARSTATUS=2 and 日期差=0,VOL/交易分钟数*240,VOL),COLOR00FFFF,LINETHICK0;
    {预测量2:IF(BARSTATUS=2,VOL*240/OPENMINUTES(CURRENTTIME),VOL),COLOR00FF00,LINETHICK0;}
    STICKLINE(BARSTATUS=2,vol,预测量,8,1),COLOR00FFFF,POINTDOT;
    A3:(HHV(VOLUME,60)+HHV(VOLUME,30))*0.52;
    A2:(HHV(VOLUME,60)+HHV(VOLUME,30))*0.55;
    B1:(LLV(VOLUME,60)+LLV(VOLUME,30))*0.45;
    B2:(LLV(VOLUME,60)+LLV(VOLUME,30))*0.55;
    hsl:=v/capital*100;
    drawnumber(v>MA(VOL,AA)*3,v,hsl,1),color4d4df ,shift1;
    drawnumber(v<MA(VOL,AA)/3,v,hsl,1),color4d4df,shift1;

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 飞狐天地量显示数字的指标 加入收藏