自研股市操作工具-精品通达信指标公式源码分享
N:=5; M:=34; K:=2; X:=67;
P:=30; TT:=240; Q:=5; KZ:=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;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!