论坛全局菜单下方 - exness285X70 - 韬客社区论坛全局菜单下方 - 荔枝返现285X70 - 韬客社区论坛全局菜单下方 - ThinkMarkets285X70 - 韬客社区论坛全局菜单下方 - TICKMILL 285X70 - 韬客社区
查看:600回复:0
草龙韬客社区韬客社区
注册时间2004-12-17
[MT4指标]EMAOsMA指标
韬客社区
楼主发表于:2014-03-14 11:46只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 附图指标, mt4指标类型:趋势指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| EMAOsMA.mq4 | //| Mohammed | //| http://www.forex-tsd.com | //+------------------------------------------------------------------+ #property copyright "Mohammed" #property link "http://www.forex-tsd.com" #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red extern int EmaPeriod = 12; extern color UpCross = Gold; extern color DownCross = DarkGreen; extern int ArrowCode1 = 233; extern int ArrowCode2 = 234; //---- buffers double ExtMapBuffer1; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); int I = WindowsTotal(); for (int count = 0; count < WindowsTotal(); count++) { int nObjects = ObjectsTotal(); for (int i=nObjects; i>=0; i--) { string objName = ObjectName(i); if(StringFind(objName, "acustom", 0) >= 0) ObjectDelete(objName); } } //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { int I = WindowsTotal(); for (int count = 0; count < WindowsTotal(); count++) { int nObjects = ObjectsTotal(); for (int i=nObjects; i>=0; i--) { string objName = ObjectName(i); if(StringFind(objName, "acustom", 0) >= 0) ObjectDelete(objName); } } return(0); } void DrawArrow( int bar , double value , int trend) { static int cnt = 0; cnt++; string crossing = "acustom_" + cnt; ObjectCreate(crossing, OBJ_ARROW, 0, Time[bar], value); if(trend == 1) { ObjectSet(crossing, OBJPROP_ARROWCODE, ArrowCode1); ObjectSet(crossing, OBJPROP_COLOR , UpCross); } if(trend == 2) { ObjectSet(crossing, OBJPROP_ARROWCODE, ArrowCode2); ObjectSet(crossing, OBJPROP_COLOR , DownCross); } ObjectSet(crossing, OBJPROP_WIDTH , 1); ObjectsRedraw(); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i, limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-IndicatorCounted(); double marray; ArrayResize( marray, limit); ArraySetAsSeries(marray,true); for(i=0; i0) { if (ExtMapBuffer1[limit] > 0 && ExtMapBuffer1[limit+1] < 0) DrawArrow (limit , Low[limit] - 1 * Point , 1); if (ExtMapBuffer1[limit] < 0 && ExtMapBuffer1[limit+1] > 0) DrawArrow (limit , High[limit] + 5 * Point , 2); limit--; } //---- return(0); } //+------------------------------------------------------------------+EMAOsMA.jpgEMAOsMA.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]