飞狐博弈KDJ副图指标
{指标参数值的含义:N、M1、M2调整KDJ线形态。
"VOL"调整成交量能图形(高度)与KDJ线的匹配状态。
红色趋势竖块:上涨 - 买入、持股 !
绿色趋势竖块:下跌 - 抛出或减仓 !
出现警示信号时说明多空较量较为激烈,更要关注图形状态,及时作出正确判断 !与其它博弈公式配合使用效果更佳 !!!}
源码
N:=16;M1:=9;M2:=3;
Var1:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
Var2:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
Var3:=SUM(Var1,5);
Var4:=SUM(Var2,5);
Var5:=IF(Var3>Var4,(Var3-Var4)/Var3,IF(Var3=Var4,0,(Var3-Var4)/Var4));
Var6:=MA(Var5,5);
Var8:=HHV(CLOSE,2);
Var9:=BARSLAST(Var8<REF(Var8,2));
VarA:=IF(Var9>=1,LLV(Var8,Var9),LOW);
VarB:=VarA+VarA*Var9*0.5/100;
VarC:=IF(VarB<REF(VarB,1),MA(LOW,3),VarB);
VarD:=VarA+VarA*(Var9-1)*1.618/100;
成交量能: VOL/POW(2,VOL), VOLSTICK;
VarE:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K: SMA(VarE,M1,1);
D: SMA(K,M2,1);
J: 3*K-2*D, , COLORBLUE;
VarF:=(2*CLOSE+HIGH+LOW+OPEN)/5;
Var10:=EMA(EMA(EMA(VarF,4),4),4);
Var11:=(Var10-REF(Var10,1))/REF(Var10,1)*100;
Var12:=MA(Var11,2);
Var13:=MA(Var11,1);
Var14:=CROSS(Var13,Var12) AND Var13<0;
Var15:=CROSS(Var13,0);
Var16:=CROSS(Var13,Var12) AND Var13>0;
Var17:=Var14;
Var18:=Var15 or Var16;
Var19:=CROSS(Var12,Var13);
Var1A:=EMA((SUM(SGN(CLOSE-REF(CLOSE,1)),0)-LLV(SUM(SGN(CLOSE-REF(CLOSE,1)),0),10))/(HHV(SUM(SGN(CLOSE-REF(CLOSE,1)),0),10)-LLV(SUM(SGN(CLOSE-REF(CLOSE,1)),0),10))*100,10);
Var1B:=SUM(HIGH-OPEN,N)/SUM(OPEN-LOW,N)*100;
Var1C:=SUM(MAX(0,HIGH-REF(CLOSE,1)),N)/SUM(MAX(0,REF(CLOSE,1)-LOW),N)*100;
Var1D:=EMA((SQRT(SQRT(OPEN*CLOSE*HIGH*LOW))-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100,3);
Var1E:=SUM(HIGH-OPEN,N)/SUM(OPEN-LOW,N)*100;
Var1F:=SUM(MAX(0,HIGH-REF(CLOSE,1)),N)/SUM(MAX(0,REF(CLOSE,1)-LOW),N)*100;
Var20:=SQRT(Var1A*Var1D);
Var21:=(2*CLOSE+HIGH+LOW+OPEN)/5;
Var22:=EMA(EMA(EMA(VarF,4),4),4);
Var23:=(Var10-REF(Var10,1))/REF(Var10,1)*100;
Var24:=MA(Var11,2);
Var25:=MA(Var11,1);
Var26:=CROSS(Var13,Var12) AND Var13<0;
Var27:=CROSS(Var13,0);
Var28:=CROSS(Var13,Var12) AND Var13>0;
Var29:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
STICKLINE(Var20>REF(Var20,1),Var20,REF(Var20,2),4,0), , COLORRED;
STICKLINE(Var20<REF(Var20,1),Var20,REF(Var20,2),4,1), , COLORGREEN;
警示│: STICKLINE(Var20>REF(Var20,1) AND ISDOWN=1 AND J>K,J,0,0,0), , ;
Var2A:=(2*CLOSE+HIGH+LOW+OPEN)/5;
Var2B:=EMA(EMA(EMA(VarF,4),4),4);
Var2C:=(Var10-REF(Var10,1))/REF(Var10,1)*100;
Var2D:=MA(Var11,2);
Var2E:=MA(Var11,1);
Var2F:=CROSS(Var13,Var12) AND Var13<0;
Var30:=CROSS(Var13,0);
Var31:=CROSS(Var13,Var12) AND Var13>0;