论坛全局菜单下方 - exness285X70 - 韬客社区论坛全局菜单下方 - 荔枝返现285X70 - 韬客社区论坛全局菜单下方 - ThinkMarkets285X70 - 韬客社区论坛全局菜单下方 - TICKMILL 285X70 - 韬客社区
查看:796回复:2
草龙韬客社区韬客社区
注册时间2004-12-17
[MT4指标]EMABands指标
韬客社区
楼主发表于:2014-07-13 22:13只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 mt4指标类型:趋势指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| EMABands_v1.mq4 | //| Copyright ? 2006, Forex-TSD.com | //| Written by IgorAD,[email protected] | //| http://finance.groups.yahoo.com/group/TrendLaboratory | //+------------------------------------------------------------------+ #property copyright \"Copyright ? 2006, Forex-TSD.com \" #property link \"http://www.forex-tsd.com/\" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Blue #property indicator_color2 Silver #property indicator_color3 Silver //---- input parameters extern int RPeriod=25; extern int MA_mode=1; extern int OffSet=40; //---- indicator buffers double MABuffer; double UpBuffer; double DnBuffer; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(0,MABuffer); SetIndexBuffer(1,UpBuffer); SetIndexBuffer(2,DnBuffer); //---- name for DataWindow and indicator subwindow label short_name=\"EMA_levels(\"+RPeriod+\")\"; IndicatorShortName(short_name); SetIndexLabel(0,\"MA\"); SetIndexLabel(1,\"Up\"); SetIndexLabel(2,\"Dn\"); //---- SetIndexDrawBegin(0,RPeriod); SetIndexDrawBegin(1,RPeriod); SetIndexDrawBegin(2,RPeriod); //---- return(0); } //+------------------------------------------------------------------+ //| EMA_Levels | //+------------------------------------------------------------------+ int start() { int shift,limit, counted_bars=IndicatorCounted(); if ( counted_bars > 0 ) limit=Bars-counted_bars; if ( counted_bars < 0 ) return(0); if ( counted_bars ==0 ) limit=Bars-RPeriod-1; for(shift=limit;shift>=0;shift--) { MABuffer[shift] = iMA(NULL,0,RPeriod,0,MA_mode,PRICE_CLOSE,shift); UpBuffer[shift] = MABuffer[shift] + OffSet*Point; DnBuffer[shift] = MABuffer[shift] - OffSet*Point; } return(0); }
TK29帖子1楼右侧xm竖版广告90-240
个性签名

阅尽天下指标
搬砖开始,始于2014

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
Pzxzx韬客社区韬客社区
注册时间2017-08-06
韬客社区
发表于:2017-08-11 08:07只看该作者
3楼
谢谢分享!!
版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]