C/C++ www.gszb.com 股票公式指标网提供 Code复制内容到剪贴板
- {短期均线N: Param#0 周期,1-55,5
- 中期均线M: Param#1 周期,10-150,34
- 均线权重因子K: Param#2,1-10,2
- 轨道宽度系数X: Param#3 ,50-300,67
- 比例因子P: Param#4 ‰ ,5-150,30
- 分析周期TT: Param#5 分钟 ,1-250,240
- 分析样本数Q: Param#6 天 ,1-55,5
- 指标类别KZ: Param#7 (0通道/1鳄组/2均线),0-2,0}
-
- P1:=(H+L+O+C)/4;
- HIA:=H+(H-L)*X/100;
- LIA:=L-(H-L)*X/100;
- 上轨:IF(KZ=0,SMA(HIA,N,K),DRAWNULL);
- 中轨:IF(KZ=0,SMA(P1,N,K),DRAWNULL),LINETHICK2;
- 下轨:IF(KZ=0,SMA(LIA,N,K),DRAWNULL);
-
- 轨宽:IF(KZ=0,(上轨/下轨-1)*100,DRAWNULL),NODRAW;
-
- PP:=(1000-P)/1000;
- KK:=(1000+P)/1000;
- HH:=HHV(H,Q*240/TT)*PP;
- LL:=LLV(L,Q*240/TT)*KK;
- 升加跌减:IF(H>=HH,HH,DRAWNULL),CROSSDOT,LINETHICK2,COLORYELLOW;
- 中期趋势:IF(KZ=0,SMA(P1,M,K),IF(KZ=2,MA(C,30*240/TT),DRAWNULL)),COLORCYAN,LINETHICK3;
- 升建跌止:IF(L<=LL,LL,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORWHITE;
-
- BLU:=REF(SMA(P1,13,1),8);
- RED:=REF(SMA(P1,8,1),5);
- GRE:=REF(SMA(P1,5,1),3);
-
- MA5:=MA(C,5*240/TT);
- MA10:=MA(C,10*240/TT);
- MA20:=MA(C,20*240/TT);
-
- 参照A:IF(KZ=1,BLU,IF(KZ=2,MA5,DRAWNULL)),COLORBLUE,LINETHICK2;
- 参照B:IF(KZ=1,RED,IF(KZ=2,MA10,DRAWNULL)),COLORRED,LINETHICK2;
- 参照C:IF(KZ=1,GRE,IF(KZ=2,MA20,DRAWNULL)),COLORGREEN,LINETHICK2;