飞狐小天雷达副图指标
源码
n1:=13;
var0:=date>970101; {过滤97年以前的显示}
var1:=(close-ref(close,1))/ref(close,1)*100;{个股涨幅}
var2:=(indexc-ref(indexc,1))/ref(indexc,1)*100;{大盘涨幅}
var3:=ema(sum(var1,n1),3);{3日内var1的n1日和的平滑平均}
var4:=ema(sum(var2,n1),3);{3日内var2的n1日和的平滑平均}
var5:=(var3-var4)*var0;
小天雷达:var5,colorstick;
20,coloraaaaaa;
-20,coloraaaaaa;
35,coloraaaaaa;
-35,coloraaaaaa;
DRAWICON(var5<-20 and FILTER(var5>ref(var5,2),7),-20,4);
VERTLINE(var5<-20 and FILTER(var5>ref(var5,2),7)),colorred;
DRAWTEXT(var5<-20 and FILTER(var5>ref(var5,2),7),-24,'参考价'),colorffffff;
DRAWNUMBER(var5<-20 and FILTER(var5>ref(var5,2),7),-30,ref(close,1)*1.015,2),colorffffff;
DRAWICON(var5>20 and FILTER(var5< ref(var5,2),7),24,5);
VERTLINE(var5>20 and FILTER(var5< ref(var5,2),7)),colorgreen;
DRAWTEXT(var5>20 and FILTER(var5
DRAWNUMBER(var5>20 and FILTER(var5< ref(var5,2),7),32,ref(close,1)*0.985,2);
STICKLINE(var5<-20 and FILTER(var5>ref(var5,2),7),0,4,10,0),colorred;