为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

MACD预警 MT4外汇指标

2017-09-25 5页 doc 18KB 185阅读

用户头像

is_633423

暂无简介

举报
MACD预警 MT4外汇指标MACD预警 MT4外汇指标 #property copyright "Copyright ?2010,Sin.Petric" //#property indicator_chart_window #property indicator_separate_window #property indicator_buffers 5 #property indicator_color1 Yellow #property indicator_color2 Red #property indicator_color3 Green #...
MACD预警 MT4外汇指标
MACD预警 MT4外汇指标 #property copyright "Copyright ?2010,Sin.Petric" //#property indicator_chart_window #property indicator_separate_window #property indicator_buffers 5 #property indicator_color1 Yellow #property indicator_color2 Red #property indicator_color3 Green #property indicator_color4 Red #property indicator_color5 Blue #property indicator_width1 2 #property indicator_width4 2 #property indicator_width5 2 //---- indicator parameters extern int FastEMA=12; extern int SlowEMA=26; extern int SignalSMA=9; //---- indicator buffers double MacdBuffer[]; double SignalBuffer[]; double SignalBuffer1[]; double UpperFr[]; double LowerFr[]; //+--------------------------------------------------------------- ---+ //| Custom indicator initialization function | //+--------------------------------------------------------------- ---+ int init() { //---- drawing settings SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_LINE); SetIndexDrawBegin(1,SignalSMA); SetIndexDrawBegin(2,SignalSMA); SetIndexBuffer(0,MacdBuffer); SetIndexBuffer(1,SignalBuffer); SetIndexBuffer(2,SignalBuffer1); SetIndexBuffer(4, LowerFr); SetIndexEmptyValue(4, 0); SetIndexStyle(4, DRAW_ARROW); SetIndexArrow(4, 242); SetIndexBuffer(3, UpperFr); SetIndexEmptyValue(3, 0); SetIndexStyle(3, DRAW_ARROW); SetIndexArrow(3, 241); IndicatorShortName("MACD("+FastEMA+","+SlowEMA+","+SignalSMA+")"); SetIndexLabel(0,"MACD"); SetIndexLabel(1,"Signal"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Moving Averages Convergence/Divergence | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0;i=SignalBuffer1[i] && SignalBuffer[i-1]SignalBuffer1[i-1]) { UpperFr[i]=SignalBuffer1[i]; Alert(TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS),",",Symbol(),",Ö ÜÆÚ:",period_pros(Period()),",MACD×ö?à,","ÂòÈë"); } } return(0); } string period_pros(int per_t) { string alart_string=""; switch(per_t) { case 1:alart_string="M1";break; case 5:alart_string="M5";break; case 15:alart_string="M15";break; case 30:alart_string="M30";break; case 60:alart_string="H1";break; case 240:alart_string="H4";break; case 1440:alart_string="D1";break; case 10080:alart_string="W1";break; case 43200:alart_string="MN";break; default:break; } return(alart_string); }
/
本文档为【MACD预警 MT4外汇指标】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索