飞狐玄黄底部副图指标源码
P:=10;
N:=5;
M:=10;
Var1:=1;
Var2:=(HIGH+LOW+OPEN+2*CLOSE)/5*Var1;
Var3:=REF(Var2,1)*Var1;
Var4:=SMA(MAX(Var2-Var3,0),p,1)/SMA(ABS(Var2-Var3),p,1)*100*Var1;
IF(COUNT(Var4=1 AND COUNT(Var2=LLV(Var2,n),m)>=1 AND CLOSE>OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND VOL>REF(VOL,1),1,0),stick,linethick3,colorred;
原理解析:
P赋值:10
N赋值:5
M赋值:10
VAR1赋值:1
VAR2赋值:(最高价+最低价+开盘价+2*收盘价)/5*VAR1
VAR3赋值:1日前的VAR2*VAR1
VAR4赋值:VAR2-VAR3和0的较大值的P日[1日权重]移动平均/VAR2-VAR3的绝对值的P日[1日权重]移动平均*100*VAR1
如果统计N日中满足VAR4=1ANDCOUNT(VAR2=N日内VAR2的最低值,M)>=1ANDCLOSE>OPENANDREF(收盘价,1)>1日前的开盘价ANDVOL>1日前的成交量(手),返回1,否则返回0,STICK,线宽为3,画红色