资源描述:
《【股票指标公式下载】-【大智慧】队长macd(零度价、股价)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、【大智慧】队长MACD(零度价、股价)-指标公式源码input:p(12,1,100),s(26,1,100),m(9,1,50),N(0,0,1);周MACD:="MACD.MACD#WEEK";STICKLINE(周MACD>=0ANDDATATYPE=8,0,周MACD,11,0),Color000055;STICKLINE(周MACD<0ANDDATATYPE=8,0,周MACD,11,0),Color515100;DIFF:(EMA(CLOSE,P)-EMA(CLOSE,S)),LINETHIC
2、K1;DEA:EMA(DIFF,M),Color1AFFFF,LINETHICK1,LAYER0;macd:(diff-dea)*2,COLORRED,LINETHICK0;PARTLINE(DIFF,DIFF>=REF(DIFF,1),RGB(200,0,200),DIFF[0andmacd>=REF(macd,1),macd,0,4,0),Color0000F2;STICKLINE(macd>0and]
3、macd[=REF(macd,1),macd,0,4,1),Color008000;ES:=IF(N=0,REF(EMA(C,S),1),EMA(C,S));EP:=IF(N=0,REF(EMA(C,P),1),EMA(C,P));DI:=IF(N=0,REF(DIFF]
4、,1),DIFF);零度价:=((P+1)*(S-1)*ES-(S+1)*(P-1)*EP)/(2*(S+1)-2*(P+1));IFN=0ANDREF(DIFF,1)<0andbarstatus=2THENBEGINDRAWTEXTREL(5,10,'DIFF上穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLOR00D0D0;END;IFN=1ANDDIFF<0andbarstatus=2THENBEGINDRAWTEXTREL(5,10,'DIFF上穿零度对应的股价:'+NUM
5、TOSTRN(零度价,2)+'元'),COLOR00D0D0;END;IFN=0ANDREF(DIFF,1)>0andbarstatus=2THENBEGINDRAWTEXTREL(5,10,'DIFF下穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLORD0D0D0;END;IFN=1ANDDIFF>0andbarstatus=2THENBEGINDRAWTEXTREL(5,10,'DIFF下穿零度对应的股价:'+NUMTOSTRN(零度价,2)+'元'),COLORD0D0D0
6、;END;拐点价:=((P-1)*EP/(P+1)-(S-1)*ES/(S+1)-DI)*(S+1)*(P+1)/(2*(P+1)-2*(S+1));IFN=0ANDREF(DIFF,1)7、TREL(5,80,'DIFF向上拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLOR00D0D0;END;IFN=0ANDREF(DIFF,1)>REF(DIFF,2)andbarstatus=2THENBEGINDRAWTEXTREL(5,80,'DIFF向下拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLORD0D0D0;END;IFN=1ANDDIFF>REF(DIFF,1)andbarstatus=2THENBEGINDRAWTEXTREL(5,80,
8、'DIFF向下拐点对应的股价:'+NUMTOSTRN(拐点价,2)+'元'),COLORD0D0D0;END;【大智慧】队长MACD(零度价、股价)-指标公式效果图下载次数:02010-12-1111:43下载(65.59KB)2010-12-1111:41(文档来源:若水财经社区)