当前位置:→ 公式网 > 公式解答 > 正文 

    问:请老师把任意选股信号用“操作区”公式过滤?

    BIAS1:=MA((CLOSE-MA(CLOSE,13))/MA(CLOSE,13),3)*100;
    BIAS3:=MA((CLOSE-MA(CLOSE,27))/MA(CLOSE,27),3)*100;
    操作区:IF(BIAS3<0,BIAS3,0),COLORRED,LINETHICK2;
    观望区:IF(BIAS3>0,BIAS3,0),COLORGREEN,LINETHICK2;
    VAR1:=IF(DATE>=1990601,0,1);
    VAR2:=TROUGHBARS(3,15,1)<10;
    VAR3:=PEAKBARS(3,15,1)<10;
    VAR4:=IF(VAR2=1,50,0);
    VAR5:=IF(VAR3=1,50,0);
    TJ1:=观望区<REF(观望区,1) OR 观望区-REF(观望区,1)<REF(观望区,1)-REF(观望区,2);
    TJ2:=操作区>REF(操作区,1);
    顶: IF(TJ1 AND VAR5=50,15,0),STICK,LINETHICK1,COLORGREEN;
    底: IF(TJ2 AND VAR4=50,10,0),STICK,LINETHICK1,COLORRED;
    DRAWICON(TJ1 AND VAR5=50,-2,8);
    DRAWICON(TJ2 AND VAR4=50,11,7);

    希望对任意选股信号,用上面的公式,从第一根红竖线到出现第一根骕竖线之间的信号保留,从这根绿竖线到下一线红竖线之间的信号过滤
     

     

    {公式在线提供:www.gszx.com.cn}答案:

    看看是不是这个意思
    BIAS1:=MA((CLOSE-MA(CLOSE,13))/MA(CLOSE,13),3)*100;
    BIAS3:=MA((CLOSE-MA(CLOSE,27))/MA(CLOSE,27),3)*100;
    操作区:=IF(BIAS3<0,BIAS3,0);
    观望区:=IF(BIAS3>0,BIAS3,0);
    VAR1:=IF(DATE>=1990601,0,1);
    VAR2:=TROUGHBARS(3,15,1)<10;
    VAR3:=PEAKBARS(3,15,1)<10;
    VAR4:=IF(VAR2=1,50,0);
    VAR5:=IF(VAR3=1,50,0);
    TJ1:=观望区<REF(观望区,1) OR 观望区-REF(观望区,1)<REF(观望区,1)-REF(观望区,2);
    TJ2:=操作区>REF(操作区,1);
    底:=TJ2 AND VAR4=50;
    顶:=TJ1 AND VAR5=50;
    JCCOUNT:COUNT(底,BARSLAST(cross(顶,0)))>0 and not(顶);

     

     

    互动内容:
    昵称: 验证码:验证码 

关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - RSS订阅 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © 铭网科技,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识