您的位置:查股网 > 查股公式 > 通达信波段转换优化副图指标公式源码[查股公式]
股票行情消息查询:

通达信波段转换优化副图指标公式源码[查股公式]

2023/1/11 20:50:46

通达信波段转换优化副图指标公式源码

段底买进段顶抛,随波加减不可少;
 走势底部需确认,走势顶部尽早跑;
 心态平和看涨跌,股海淘金乐逍遥
{波段转换(优化)(通达信副图)}
{INPUT: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;

相关文章列表
天天查股公式列表

股票公式分类

天天查股:股票行情消息 实时DDX在线 资金流向 千股千评 业绩报告 十大股东 最新消息 超赢数据 大小非解禁 停牌复牌 股票分红查询 股票评级报告
广告客服:315126368   843010021
天天查股网免费查股,本站内容与数据仅供参考,不构成投资建议,据此操作,风险自担,股市有风险,投资需谨慎。 沪ICP备15043930号-29