手机版
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮助根据指标编写选股公式

[飞 狐]
设置
1177 2 种zgltsdzb Lv.1 发表于 · 2020-10-12 14:51 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
老师您好:

           请把以下指标编写成 周k线 一阳穿三线选股公式(所选指标5 10 20 周线一阳穿三线必须在周开盘价和收盘价之间) 。            

                                                                                                                                                   谢谢!!

    1  周K线的引用

     ND1970:=(YEAR-1970)*365+INTPART((YEAR-1972)/4)-IF(INTPART(YEAR/4)=YEAR/4,1,0)+DAY+(MONTH-    1)*30+IF(MONTH<=8,INTPART(MONTH/2),INTPART((MONTH-7)/2)+4)-IF(MONTH>2 AND INTPART(YEAR/4)=YEAR/4,1,IF(MONTH>2 AND      NOT(INTPART(YEAR/4)=YEAR/4),2,0));
     C1:C;
    O1:REF(O,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1)));
    H1:HHV(H,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1))+1);
   L1:LLV(L,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1))+1);

  2  周K线

      WO1:="周K线的引用.O1#WEEK";
      WC:="周K线的引用.C1#WEEK";
      WH:="周K线的引用.H1#WEEK";
      WL:="周K线的引用.L1#WEEK";
      K1:=WO1=REF(WO1,1) AND WC=REF(WC,1) AND WH=REF(WH,1) AND WL=REF(WL,1);
      K3:=REF(C,1)=DYNAINFO(3) AND O=DYNAINFO(4) AND C=DYNAINFO(7) AND H=DYNAINFO(5) AND L=DYNAINFO(6);
      DD:=REF(BARSLAST(K1=0)+1,1),COLORLIGHTRED  ;
      DD1:=CROSS(BACKSET((K1=0 OR K3) AND DD=5,4),0.5),NODRAW;
      DD2:=CROSS(BACKSET((K1=0 OR K3) AND (DD=4 OR DD=3),3),0.5),NODRAW;
      DD3:=CROSS(BACKSET((K1=0 OR K3) AND DD<=2,2),0.5),COLORLIGHTRED ;
      BK1:=DD1 OR DD2 OR DD3;
      BK2:=CROSS(BACKSET(K1=0,2),0.5);
      BK3:=CROSS(BACKSET(K1=0 AND REF(K1=0,1),2),0.5);
      WO:IF(BARSLAST(K1=0)=0,O,REF(O,BARSLAST(K1=0))),NODRAW;
      五周:MA(C,25),COLORWHITE;
     十周:MA(C,50),COLORYELLOW;
     二十周:MA(C,90),COLORGREEN;
     K0:=WC>WO OR (WC=WO AND WC>REF(WC,BARSLAST(K1=0)+1));
     STICKLINE(K0 AND BK1,WH,WC,0,0),COLORRED ;
     STICKLINE(K0 AND BK1,WO,WL,0,0),COLORRED ;
     STICKLINE(K0 AND K1=0,WC,WO,0,0),COLORRED ;
     STICKLINE(K0 AND (BK2 OR K3),WC,WO,0,0),COLORRED ;
     STICKLINE(K0 AND ((K1 AND BK2=0 AND K3=0) OR BK3),WC,WC,8,1),COLORRED ;
     STICKLINE(K0 AND ((K1 AND BK2=0 AND K3=0) OR BK3),WO,WO,8,1),COLORRED ;
     STICKLINE(NOT(K0) AND BK1,WH,WO,0,0),COLORCYAN ;
     STICKLINE(NOT(K0) AND BK1,WC,WL,0,0),COLORCYAN ;
     STICKLINE(NOT(K0) AND K1=0,WC,WO,0,0),COLORCYAN ;
     STICKLINE(NOT(K0) AND (BK2 OR K3),WC,WO,0,0),COLORCYAN ;
     STICKLINE(NOT(K0) AND ((K1 AND BK2=0 AND K3=0) OR BK3),WC,WC,8,1),COLORCYAN ;
     STICKLINE(NOT(K0) AND ((K1 AND BK2=0 AND K3=0) OR BK3),WO,WO,8,1),COLORCYAN ;




    {参考(日一阳穿三线选股公式)}
      
      B1:=MAX(MAX(MA(C,5),MA(C,10)),MA(C,20))<C AND O<MIN(MIN(MA(V,5),MA(C,10)),MA(C,20));
     B2:=MAX(MAX(MA(C,10),MA(C,10)),MA(C,20))<C AND O<MIN(MIN(MA(V,10),MA(C,10)),MA(C,20));
     B3:=C/REF(C,1)>1.048;  {.48%}
     sx5:B1 AND B2 AND B3;  
     B1:=MAX(MAX(MA(C,5),MA(C,10)),MA(C,20))<C AND O<MIN(MIN(MA(V,5),MA(C,10)),MA(C,20));
     B2:=MAX(MAX(MA(C,10),MA(C,10)),MA(C,20))<C AND O<MIN(MIN(MA(V,10),MA(C,10)),MA(C,20));
     B3:=C/REF(C,1)>1.048;  {.48%}
     sx5:B1 AND B2 AND B3;  






                                                                                                                                        谢谢!!

举报

扔鸡蛋(0) 回复

种zgltsdzb
Lv.1
发表于 2020-10-12 18:37 复制 查看全部楼层
衷心感谢 注册111 老师的帮助 祝您事事顺心 事业有成

举报

点亮(1) 扔鸡蛋(0) 回复

注册111
Lv.6
发表于 2020-10-12 16:24 复制 查看全部楼层
周K线的引用
ND1970:=(YEAR-1970)*365+INTPART((YEAR-1972)/4)-IF(INTPART(YEAR/4)=YEAR/4,1,0)+DAY+(MONTH-    1)*30+IF(MONTH<=8,INTPART(MONTH/2),INTPART((MONTH-7)/2)+4)-IF(MONTH>2 AND INTPART(YEAR/4)=YEAR/4,1,IF(MONTH>2 AND      NOT(INTPART(YEAR/4)=YEAR/4),2,0));
C1:C;
O1:REF(O,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1)));
H1:HHV(H,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1))+1);
L1:LLV(L,BARSLAST(ND1970-REF(ND1970,1)>WEEKDAY-REF(WEEKDAY,1))+1);
c2:ref(c,1);


选股
WO:="周K线的引用.O1#WEEK";
  WC:="周K线的引用.C1#WEEK";
  zc:="周K线的引用.C2#WEEK";
  B1:=MAX(MAX(MA(C,25),MA(C,50)),MA(C,90))<WC AND WO<MIN(MIN(MA(C,25),MA(C,50)),MA(C,90));
B2:=MAX(MAX(MA(C,50),MA(C,50)),MA(C,90))<C AND WO<MIN(MIN(MA(C,50),MA(C,50)),MA(C,90));
B3:=WC/REF(zc,1)>1.048;  {.48%}
sx5:B1 AND B2 AND B3;  

附件

捕获.JPG
查看全部打赏
  • 福阿德+8理想币 +7共享币 : 理想精神:分享,互助,友善,传递正能量!
  • 种zgltsdzb+10理想币 +2共享币 : 很给力,投资愉快,理想因你而精彩;

举报

点亮(2) 扔鸡蛋(0) 回复

您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

论坛问题
微信扫一扫,添加好友咨询
驿站问题
微信扫一扫,添加好友咨询
广告投放
微信扫一扫,添加好友咨询
回顶部 到页底
快速回复 返回顶部 返回列表