股友量 发表于 2022-1-12 11:38

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

606.问:
      分析家通过却无法正常显示

      n=5,n1=7;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
PARTLINE(RSI1,RSI1),COLORff3399,LINETHICK2;
STICKLINE(RSI1,20,20,3,0),COLORYELLOW;
STICKLINE(RSI1,50,50,3,0),COLORWHITE;
STICKLINE(RSI1,80,80,3,0),COLORYELLOW;
STICKLINE(RSI1<20,0,RSI1,3,0),COLORCYAN;
STICKLINE(RSI1>80,100,RSI1,3,0),COLORRED;
STICKLINE(RSI1<20,0,5,10,0),COLORCYAN;
STICKLINE(RSI1>80,100,95,10,0),COLORRED;
STICKLINE(REF(RSI1,1)<20 AND RSI1>REF(RSI1,1),0,50,3,0),COLORRED;
STICKLINE(REF(RSI1,1)>80 AND RSI1<REF(RSI1,1),0,65,3,0),COLORGREEN;
STICKLINE(REF(RSI1,1)<20 AND RSI1>REF(RSI1,1),0,5,10,0),COLORRED;
STICKLINE(REF(RSI1,1)>80 AND RSI1<REF(RSI1,1),0,5,10,0),COLORGREEN;
DRAWICON(REF(RSI1,1)<20 AND RSI1>REF(RSI1,1),50,0);
DRAWICON(REF(RSI1,1)>80 AND RSI1<REF(RSI1,1),65,2);
STICKLINE(RSI1,100,100,10,0),COLORWHITE;
STICKLINE(RSI1,112,112,10,0),COLORWHITE;
FILLRGN(RSI1>=50,103,108),COLORRED;
FILLRGN(RSI1<=50,103,108),COLORCYAN;
STICKLINE(RSI1,0,0,10,0),COLORWHITE;
STICKLINE(RSI1,-12,-12,10,0),COLORWHITE;
STICKLINE(RSI1>=REF(RSI1,1),-3,-8,6,0),COLORRED;
STICKLINE(RSI1<=REF(RSI1,1),-3,-8,6,0),COLORCYAN;
TY:=RSI1;
AA:=REF(TY,N)=HHV(TY,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND TY=HHV(TY,N+1);
DRAWICON(CC,TY*1.07,10);
p1:=BARSLAST(REF(CC,1));
q1:=REF(CLOSE,p1+1)<CLOSE and REF(RSI1,p1+1)>RSI1 and CC;
STICKLINE(FILTER(q1>0,5),100,RSI1,3,0),COLORMAGENTA;
STICKLINE(FILTER(q1>0,5),100,95,10,0),COLORMAGENTA;
DRAWLINE(CC,RSI1,FILTER(q1>0,5),RSI1,0),COLORMAGENTA;
AA2:=REF(TY,N)=LLV(TY,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND TY=LLV(TY,N+1);
DRAWICON(CC2,TY*0.95,11);
p2:=BARSLAST(REF(CC2,1));
q2:=REF(CLOSE,p2+1)>CLOSE and REF(RSI1,p2+1)<RSI1 AND CC2;
STICKLINE(FILTER(q2>0,5),0,RSI1,3,0),COLORGREEN;
STICKLINE(FILTER(q2>0,5),0,5,10,0),COLORGREEN;
DRAWLINE(CC2,RSI1,FILTER(q2>0,5),RSI1,0),COLORGREEN;
    答(流光之星):
FILLRGN(RSI1>=50,103,108),COLORRED;
FILLRGN(RSI1<=50,103,108),COLORCYAN;
      改为
FILLRGN(103,108,RSI1>=50),COLORRED;
FILLRGN(103,108,RSI1<=50),COLORCYAN;
      试试。

悟空 发表于 2022-1-12 12:08

谢谢楼主分享
页: [1]
查看完整版本: 指标编写问答125学习的宝藏