股友量 发表于 2022-1-4 20:33

指标编写问答80学习的宝藏

401.问:
      怎样才能把大盘的K线图设为个股的副图,或与个股叠加?最好是设为副图,我用分析
       家5.0 网络版。
    答(炒着玩):
      副图上显示大盘日K线
      上证!

      开盘:"1a0001$OPEN"LINETHICK0;
      收盘:"1a0001$CLOSE"LINETHICK0;
      最高:"1a0001$HIGH"LINETHICK0;
      最低:"1a0001$LOW"LINETHICK0;
      昨收盘:=REF(收盘,1)LINETHICK0;
      涨跌:(收盘-REF(收盘,1))/REF(收盘,1)*100,LINETHICK0;
      成交金额:"1a0001$AMOUNT"/100000000,LINETHICK0;
      ope:="1a0001$open";
      clos:="1a0001$close";
      hig:="1a0001$high";
      l="1a0001$low";
      STICKLINE(ope>=clos ,clos ,ope,7,0 ),COLORGREEN;
      STICKLINE(clos>ope,clos,ope,7,1),COLORRED;
      STICKLINE(clos>ope,ope,lo,0.5,0),COLORRED;
      STICKLINE(clos>ope,clos,HIG,0.5 ,0 ),COLORRED;
      STICKLINE(ope>=clos,clos,lo,0.5 ,0 ),COLORGREEN;
      STICKLINE(ope>=clos,ope,HIG,0.5 ,0 ),COLORGREEN;
      STICKLINE(clos=ope AND Clos>REF(Clos,1),clos,ope,7 ,0 ),COLORRED;
      STICKLINE(close=ope AND Clos>REF(Clos,1),clos,HIG,0.5 ,0 ),COLORRED;
      STICKLINE(close=ope AND Clos>REF(Clos,1),ope,lo,0.5,0 ),COLORRED;
      MA5:MA(Close,5),COLORWHITE;
      MA10:MA(Close,10),COLORYELLOW;
      MA20:MA(Close,20);
      MA60:ma(close,60),COLORGREEN;

                  
         {大盘指数副图,源码}
      STICKLINE(INDEXC>=INDEXO,INDEXC,INDEXO,8,1),COLORRED;
      STICKLINE(INDEXC>=INDEXO,INDEXO,INDEXL,0.1,0),COLORRED;
      STICKLINE(INDEXC>=INDEXO,INDEXC,INDEXH,0.1,0),COLORRED;
      STICKLINE(INDEXC<=INDEXO,INDEXC,INDEXO,8,0),COLORCYAN;
      STICKLINE(INDEXC<=INDEXO,INDEXH,INDEXO,0.1,0),COLORCYAN;
      STICKLINE(INDEXC<=INDEXO,INDEXC,INDEXL,0.1,0),COLORCYAN;

      二者都是fxj和fh通用!但前者含均线!


402.问:
   求助月kdj指标公式!
    答(灵如云):
      yk:"kdj.k#month";
      yd:"kdj.d#month";
      yj:"kdj,j#month";


403.问:
      个选股指标:当日股价离X日均线还有X%相交。
    答(灵如云):
      cross(c*(1+X/100),ma(c,X));


404.问:
      庄筹线:EMA(WINNER(C)*70,5) colorred linethick2;
      散筹线:EMA((WINNER(C*1.1)-WINNER(C*0.91))*80,5) colorgreen linethick2;
      以上为源码,下边是我想在指标上加一个抄底指标并绘制一条浅蓝色柱线,并过滤
      重复信 号,我比葫芦画瓢也没有搞出来
      抄底:EMA(WINNER(C)*70,5)<5AND(EMA((WINNER(C*1.1)-WINNER(C*0.91))*80,5))<5,
    答(元興):
      看看这样是否合你意?

      庄籌線:EMA(WINNER(C)*70,5) colorred linethick2;
      散籌線:EMA((WINNER(C*1.1)-WINNER(C*0.91))*80,5) colorgreen linethick2;
      5*(EMA(WINNER(C)*70,5)<5),colorcyan;
      10*(EMA((WINNER(C*1.1)-WINNER(C*0.91))*80,5)<5),colorwhite;
      抄底:(EMA(WINNER(C)*70,5)<5 AND (EMA((WINNER(C*1.1)-WINNER(C*0.91))*80,5))<5)   
      *40,linethick2,colorff9900;
      stickline(抄底>0,抄底,0,3,0),coloryellow;
    答(股影):
      有两种方法:1,周期过滤(加上A1);   2,只过滤连续重复信号(加上A2),
      然后将 抄底一: STICKLINE (chao,0,18,7,0),COLORFF9933;中的 chao 换成A1 或A2,
      两种方法可任选其一。
       海底活鱼2.....采用了A1,    海底活鱼3.....采用了A2.......

       {正版庄见愁+正版海底活鱼}
      庄筹线:EMA(WINNER(C)*70,5), colorred, linethick2;
      散筹线:EMA((WINNER(C*1.1)-WINNER(C*0.91))*80,5), colorgreen, linethick2;
      KS13:=(C-SMA(C,13,1))/SMA(C,13,1)*(-100);
      AAA:=REF(KS13,1)>13 AND REF(KS13,1)/KS13>1.23 AND C/REF(C,1)>1.03;
      海底活鱼:IF(AAA AND REF(C,1)<COST(5),30,0),colorwhite ,linethick2;
      FILLRGN(庄筹线>散筹线,庄筹线,散筹线) ,COLORRED;
      chao:=(庄筹线<5 AND散筹线<5);
      A1:=FILTER(chao,5);{周期5可自定}
      A2:=chao AND NOT(chao=REF(chao,1));
      抄底一: STICKLINE (chao,0,18,7,0),COLORFF9933;


405.问:
      编写一个选股公式;
      指标线N上穿30 ,并且指标线N已经在20以下运行20天以上.
    答(君俊):
      cross(n,30) and count(n<20,21)>=20;

页: [1]
查看完整版本: 指标编写问答80学习的宝藏