在线检测未来函数

通达信快慢波段走势指标公式

来源:Internet,编辑:股旁网,2023-03-07

P:=25;
S:=8;
M:=5;
M1:=14;
M2:=14;
M3:=9;
DRAWTEXT_FIX(1,0.01,0,0,'段底买进段顶抛,随波加减不可少;走势底部需确认,走势顶部尽早跑;心态平和看涨跌,股海淘金乐逍遥!'),COLORFF00FF;
TYP:= (HIGH + OPEN*2 +2*LOW + CLOSE)/6;
cci:=(TYP-MA(TYP,M1))/(0.015*AVEDEV(TYP,M1));
wr:=(50-100*(HHV(HIGH,M2)-CLOSE)/(HHV(HIGH,M2)-LLV(LOW,M2)))*3;
RSV:=(CLOSE-LLV(LOW,M3))/(HHV(HIGH,M3)-LLV(LOW,M3))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=(3*K-2*D-50)*3;
PJZ:=(CCI+WR+J)/3;
DIFF1:=EMA(EMA(PJZ,S),3)*EMA(EMA(EMA(CLOSE,S),3),3)/100 - EMA(EMA(PJZ,P),5)*EMA(EMA(EMA(CLOSE,P),5),5)/100;
DEA1:=EMA(EMA(DIFF1,M),5);
Cmacd:=2*(DIFF1-DEA1);
CCIL:=(TYP-MA(TYP,M1*25))/(0.015*AVEDEV(TYP,M1*25));
WRL:=(50-100*(HHV(HIGH,25*M2)-CLOSE)/(HHV(HIGH,25*M2)-LLV(LOW,25*M2)))*3;
RSVL:=(CLOSE-LLV(LOW,25*M3))/(HHV(HIGH,25*M3)-LLV(LOW,25*M3))*100;
KL:=SMA(RSV,25*3,1);
DL:=SMA(KL,3*25,1);
JL:=(3*KL-2*DL-50)*3;
PJZL:=CCIL+WRL+JL;
CDIFFL:=EMA(EMA(PJZL,S*25),3)*EMA(EMA(EMA(CLOSE,S*25),3),3)/100 - EMA(EMA(PJZL,P*25),5)*EMA(EMA(EMA(CLOSE,P*25),5),5)/100;
CDEAL:=EMA(EMA(CDIFFL,M*25),5);
CMACDL:=(CDIFFL-CDEAL);
STICKLINE(CMACDL>0,0,CMACDL,5,0),COLOR440044;
STICKLINE(CMACDL<0,0,CMACDL,5,0),COLOR440044;
CCIS:=(TYP-MA(TYP,M1*5))/(0.015*AVEDEV(TYP,M1*5));
WRS:=(50-100*(HHV(HIGH,5*M2)-CLOSE)/(HHV(HIGH,5*M2)-LLV(LOW,5*M2)))*3;
RSVS:=(CLOSE-LLV(LOW,5*M3))/(HHV(HIGH,5*M3)-LLV(LOW,5*M3))*100;
KSS:=SMA(RSVS,3*5,1);
DSS:=SMA(KSS,3*5,1);
JS:=(3*KSS-2*DSS-50)*3;
PJZS:=CCIS+WRS+JS;
CDIFFS:=EMA(EMA(PJZS,S*5),3)*EMA(EMA(EMA(CLOSE,S*5),3),3)/100 - EMA(EMA(PJZS,P*5),5)*EMA(EMA(EMA(CLOSE,P*5),5),5)/100;
CDEAS:=EMA(EMA(CDIFFS,M*5),5);
CMACDS:=(CDIFFS-CDEAS);
STICKLINE(CMACDS>0,0,CMACDS,0.1,0),COLOR444400;
STICKLINE(CMACDS<0,0,CMACDS,0.1,0),COLOR444400;
MACDHS:=IF(CMACD>0 AND CMACD>=REF(CMACD,1),CMACD,0);
MACDHX:=IF(CMACD>0 AND CMACD<=REF(CMACD,1),CMACD,0);
MACDLX:=IF(CMACD<0 AND CMACD<=REF(CMACD,1),CMACD,0);
MACDLS:=IF(CMACD<0 AND CMACD>=REF(CMACD,1),CMACD,0);
STICKLINE(MACDHS>0,0,CMACD,2.7,0),COLOR0000BB;
STICKLINE(MACDHS>0,0,CMACD,2.4,0),COLOR0000CC;
STICKLINE(MACDHS>0,0,CMACD,2.1,0),COLOR0011CC;
STICKLINE(MACDHS>0,0,CMACD,1.8,0),COLOR1122DD;
STICKLINE(MACDHS>0,0,CMACD,1.5,0),COLOR2233DD;
STICKLINE(MACDHS>0,0,CMACD,1.2,0),COLOR3344EE;
STICKLINE(MACDHS>0,0,CMACD,0.9,0),COLOR4455EE;
STICKLINE(MACDHS>0,0,CMACD,0.6,0),COLOR5566FF;
STICKLINE(MACDHS>0,0,CMACD,0.3,0),COLOR6677FF;
STICKLINE(MACDHX>0,0,CMACD,2.7,0),COLOR0077BB;
STICKLINE(MACDHX>0,0,CMACD,2.4,0),COLOR0088CC;
STICKLINE(MACDHX>0,0,CMACD,2.1,0),COLOR0099CC;
STICKLINE(MACDHX>0,0,CMACD,1.8,0),COLOR00AADD;
STICKLINE(MACDHX>0,0,CMACD,1.5,0),COLOR00bbdD;
STICKLINE(MACDHX>0,0,CMACD,1.2,0),COLOR00CCEE;
STICKLINE(MACDHX>0,0,CMACD,0.9,0),COLOR00ddeE;
STICKLINE(MACDHX>0,0,CMACD,0.6,0),COLOR00EEFF;
STICKLINE(MACDHX>0,0,CMACD,0.3,0),COLOR00FFFF;
STICKLINE(MACDLX<0,CMACD,0,2.7,0),COLOR770000;
STICKLINE(MACDLX<0,CMACD,0,2.4,0),COLOR881100;
STICKLINE(MACDLX<0,CMACD,0,2.1,0),COLOR992200;
STICKLINE(MACDLX<0,CMACD,0,1.8,0),COLORAA3300;
STICKLINE(MACDLX<0,CMACD,0,1.5,0),COLORBB4400;
STICKLINE(MACDLX<0,CMACD,0,1.2,0),COLORCC5500;
STICKLINE(MACDLX<0,CMACD,0,0.9,0),COLORDD6600;
STICKLINE(MACDLX<0,CMACD,0,0.6,0),COLOREE7700;
STICKLINE(MACDLX<0,CMACD,0,0.3,0),COLORFF8800;
STICKLINE(MACDLS<0,CMACD,0,2.7,0),COLOR005500;
STICKLINE(MACDLS<0,CMACD,0,2.4,0),COLOR007700;
STICKLINE(MACDLS<0,CMACD,0,2.1,0),COLOR009900;
STICKLINE(MACDLS<0,CMACD,0,1.8,0),COLOR00AA00;
STICKLINE(MACDLS<0,CMACD,0,1.5,0),COLOR00BB00;
STICKLINE(MACDLS<0,CMACD,0,1.2,0),COLOR00CC00;
STICKLINE(MACDLS<0,CMACD,0,0.9,0),COLOR00DD00;
STICKLINE(MACDLS<0,CMACD,0,0.6,0),COLOR00EE00;
STICKLINE(MACDLS<0,CMACD,0,0.3,0),COLOR00FF00;
波:CMACD,COLOR0000FF,NODRAW;
快速:DIFF1,COLORFFFFFF;
慢速:DEA1,COLOR00FFFF;
段:CMACDS,COLOR444400,NODRAW;
走势:CMACDL,COLOR440044,NODRAW;

通达信快慢波段走势指标公式

相关文章