以下是飞狐牛熊级别源码
飞狐牛熊级别源码
INPUT:n(240,0,10000);
最高:hhv(h,n),LINETHICK;//N = 0 是历史最高价
幅度:(c/REF(最高,1)-1)*100,LINETHICK;
牛能级别:if(幅度>=0,0,if(BETWEEN(幅度,0,-10),1,if(BETWEEN(幅度,-10,-20),2,if(BETWEEN(幅度,-20,-30),3,if(BETWEEN(幅度,-30,-40),4,if(BETWEEN(幅度,-40,-50),5,if(BETWEEN(幅度,-50,-60),6,if(BETWEEN(幅度,-60,-70),7,8))))))));