论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
  • 1
  • 2
前往
共 32 条
sumone
注册时间2006-09-09
[求助]能否请大神帮忙改一下这个提醒指标,让她只发固定次数的邮件,现在简直是邮箱炸弹~~~
楼主发表于:2017-10-25 01:01只看该作者
21楼 电梯直达
电梯直达
这样就省心多了~~:lol
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
sumone
注册时间2006-09-09
楼主发表于:2017-10-25 13:58来自移动端只看该作者
22楼
效果一流,应该人手一份,再次感谢楼上的大神IMG_6259.PNGIMG_6259.PNG
mjp204
注册时间2014-09-24
水瓶座
发表于:2017-10-27 10:44只看该作者
23楼
#property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 White #property indicator_color2 Yellow #property indicator_color3 Yellow #property indicator_color4 White extern int 间隔分钟=1; extern int 均线周期1=13; extern int 均线周期2=233; extern int 类型1=1; //类型: 0-SMA; 1-EMA; 2-SMMA; 3-LWMA extern int 类型2=1; //类型: 0-SMA; 1-EMA; 2-SMMA; 3-LWMA extern string 类型说明="0-SMA; 1-EMA; 2-SMMA; 3-LWMA"; extern int 文字水平=0; extern int 文字垂直=0; extern int 文字大小=14; extern string 文字标识="1"; extern color 文字颜色=Yellow; extern int 是否报警=1; extern int 是否发邮件=1; double Ma13; double Ma233; double Up; double Down; int TimeInMinute; int FlagAlert=0; datetime NextTime=0; int init() { IndicatorBuffers(4); SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_ARROW); SetIndexStyle(3,DRAW_ARROW); SetIndexBuffer(0,Ma13); SetIndexBuffer(1,Ma233); SetIndexBuffer(2,Up); SetIndexBuffer(3,Down); SetIndexArrow(2,233); SetIndexArrow(3,234); TimeInMinute=0; return(0); } int start() { int i; int limit; string Signal; int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for (i=limit-1;i>=0;i--) { Ma13=iMA(NULL,0,均线周期1,0,类型1,PRICE_CLOSE,i); Ma233=iMA(NULL,0,均线周期2,0,类型2,PRICE_CLOSE,i); if ((Ma13[i+1]Ma233)&&(Close>Ma13)&&(Close>Ma233)) { Signal="["+Period()+"分钟]"+TimeMonth(Time+TimeInMinute)+"月"+TimeDay(Time+TimeInMinute)+"日"+TimeHour(Time+TimeInMinute)+"点"+TimeMinute(Time+TimeInMinute)+"分 "+Symbol()+"在价格"+DoubleToStr(Close,4)+"发生"+均线周期1+"均线上穿"+均线周期2+"均线"; writetext(文字标识,Signal,20+文字水平,40+文字垂直,文字颜色,文字大小); Up=Low-3*Point; if (i==0) { if (FlagAlert==0) { if (是否报警==1) Alert(Signal); if (是否发邮件==1) if( TimeLocal()>NextTime) SendMail(Signal,Signal); NextTime=TimeLocal()+间隔分钟*60; FlagAlert=1; } } } if ((Ma13[i+1]>Ma233[i+1])&&(Ma13NextTime) SendMail(Signal,Signal); NextTime=TimeLocal()+间隔分钟*60; FlagAlert=1; } } }else FlagAlert=0; } return(0); } void writetext(string Labelname,string data,int x,int y,color ColorValue,int FontSize)//通过Object写文字 { ObjectDelete(Labelname); ObjectCreate(Labelname, OBJ_LABEL, 0, 0, 0); ObjectSetText(Labelname, data, FontSize, "Arial", ColorValue); ObjectSet(Labelname, OBJPROP_CORNER, 0); ObjectSet(Labelname, OBJPROP_XDISTANCE, x); ObjectSet(Labelname, OBJPROP_YDISTANCE, y); }
mjp204
注册时间2014-09-24
水瓶座
发表于:2017-10-27 10:45只看该作者
24楼
用普通邮箱还是会有发邮件数的限制。。最好自己想办法申请个企业邮
sumone
注册时间2006-09-09
楼主发表于:2017-10-30 01:10只看该作者
25楼
mjp204 发表于 2017-10-27 18:45
用普通邮箱还是会有发邮件数的限制。。最好自己想办法申请个企业邮
谢谢! 限制下邮件数后qq邮箱就够用了~

点评

能发给我吗???我的发几次有点频繁了。。。不够简洁发表于 2017-11-14 15:04
这个我也不懂。。。摸索跟搜索很久才找到解决办法发表于 2017-10-31 15:53
qiyeyi
注册时间2015-12-03
mjp204
注册时间2014-09-24
水瓶座
发表于:2017-10-31 15:53只看该作者
27楼
sumone 发表于 2017-10-30 09:10
谢谢! 限制下邮件数后qq邮箱就够用了~
这个我也不懂。。。摸索跟搜索很久才找到解决办法
mjp204
注册时间2014-09-24
水瓶座
发表于:2017-11-14 15:04只看该作者
28楼
sumone 发表于 2017-10-30 09:10
谢谢! 限制下邮件数后qq邮箱就够用了~
能发给我吗???我的发几次有点频繁了。。。不够简洁
sumone
注册时间2006-09-09
楼主发表于:2017-11-15 01:56只看该作者
29楼
mjp204 发表于 2017-11-14 23:04
能发给我吗???我的发几次有点频繁了。。。不够简洁
我传不了附件~附上代码你自己弄一下吧 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Yellow #property indicator_color2 White #property indicator_color3 Yellow #property indicator_color4 White //---- input parameters extern int 均线周期1=2; extern int 均线周期2=21; extern int 类型1=1; //类型: 0-SMA; 1-EMA; 2-SMMA; 3-LWMA extern int 类型2=1; //类型: 0-SMA; 1-EMA; 2-SMMA; 3-LWMA extern string 类型说明="0-SMA; 1-EMA; 2-SMMA; 3-LWMA"; extern int 文字水平=0; extern int 文字垂直=0; extern int 文字大小=14; extern string 文字标识="1"; extern color 文字颜色=Yellow; extern bool 是否报警=true; //extern int 是否报警=1; extern bool 是否发邮件=true; //extern int 是否发邮件=1; extern int 邮件间隔=20; extern int 报警间隔=20; //---- buffers double Ma10; double Ma130; double Up; double Down; int TimeInMinute; int FlagAlert=0; datetime prvEmailTime=0; datetime prvAlertTime=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorBuffers(4); SetIndexStyle(0,DRAW_LINE); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_ARROW); SetIndexStyle(3,DRAW_ARROW); SetIndexBuffer(0,Ma10); SetIndexBuffer(1,Ma130); SetIndexBuffer(2,Up); SetIndexBuffer(3,Down); SetIndexArrow(2,233); SetIndexArrow(3,234); TimeInMinute=0; //---- return(0); } int start() { int i; int limit; string Signal; int counted_bars=IndicatorCounted(); //---- check for possible errors if(counted_bars<0) return(-1); //---- the last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for (i=limit-1;i>=0;i--) { Ma10=iMA(NULL,0,均线周期1,0,类型1,PRICE_CLOSE,i); Ma130=iMA(NULL,0,均线周期2,0,类型2,PRICE_CLOSE,i); if ((Ma10[i+1]Ma130)&&(Close>Ma10)&&(Close>Ma130)) { Signal="["+Period()+"分钟]"+TimeMonth(Time+TimeInMinute)+"月"+TimeDay(Time+TimeInMinute)+"日"+TimeHour(Time+TimeInMinute)+"点"+TimeMinute(Time+TimeInMinute)+"分 "+Symbol()+"在"+DoubleToStr(Close,4)+"上穿均线"; writetext(文字标识,Signal,20+文字水平,40+文字垂直,文字颜色,文字大小); Up=Low-3*Point; if (i==0) { if (FlagAlert==0) { if (是否报警) { if(prvAlertTime+报警间隔*60 <= TimeCurrent()) { {Alert(Signal);} prvAlertTime=TimeCurrent(); } } if (是否发邮件) { if(prvEmailTime+邮件间隔*60 <= TimeCurrent()) { SendMail(Signal,Signal); prvEmailTime=TimeCurrent(); } } FlagAlert=1; } } } if ((Ma10[i+1]>Ma130[i+1])&&(Ma10

点评

运行报错。。。能把 .mq4文件发到我QQ邮箱吗???发表于 2017-11-15 10:39
个性签名

韬客社区www.talkfx.co

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部
mjp204
注册时间2014-09-24
水瓶座
发表于:2017-11-15 10:39只看该作者
30楼
sumone 发表于 2017-11-15 09:56
我传不了附件~附上代码你自己弄一下吧 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #property indicator_chart_w ...
运行报错。。。能把 .mq4文件发到我QQ邮箱吗???[email protected]QQ截图20171115183815.pngQQ截图20171115183815.png
个性签名

韬客社区www.talkfx.co

sumone
注册时间2006-09-09
楼主发表于:2017-11-16 04:01只看该作者
31楼
mjp204 发表于 2017-11-15 18:39
运行报错。。。能把 .mq4文件发到我QQ邮箱吗???
已发,你用的是MT4吗?

点评

是啊。。。我报错了我都添加了{i} 通过了但是要全时段显示才看的到均线。。。小时段的看不到。。。真是奇了怪了发表于 2017-11-16 11:42
mjp204
注册时间2014-09-24
水瓶座
发表于:2017-11-16 11:42只看该作者
32楼
sumone 发表于 2017-11-16 12:01
已发,你用的是MT4吗?
是啊。。。我报错了我都添加了{i} 通过了但是要全时段显示才看的到均线。。。小时段的看不到。。。真是奇了怪了
  • 1
  • 2
前往
共 32 条

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]