查看完整版本: 请问版主是否有发邮件警示的指标?

wltien 2007-10-23 13:41

请问版主是否有发邮件警示的指标?

版主你好!

我最近因为不方便看盘,因此想在指标中加能够发邮件给予警示的指标,不知道版主是否能够协助?

谢谢!

xfxyldj 2007-10-23 16:52

回复 1楼 的帖子

用sendmail()函数。
void SendMail( string subject, string some_text)
Sends a message to the e-mail set in the Tools->Options->EMail tab.
The sending can be disabled in settings, or it can be omitted to specify the e-mail address. To get the detailed error information, one has to call the GetLastError() function.
Parameters:
subject   -   Subject text.
some_text   -   Mail body.

Sample:
  double lastclose=Close[0];
  if(lastclose<my_signal)
    SendMail("from your expert", "Price dropped down to "+DoubleToStr(lastclose,Digits));

wltien 2007-10-23 18:16

谢谢版主......

wltien 2007-10-25 10:04

另外,请问版主,如果不是指标(indicator),而是script,我把script放在c:\program\metatrader\expert\script之后,应该如何使用?我看了help还是搞不懂.....

xfxyldj 2007-10-25 10:09

回复 4楼 的帖子

通过导航窗口加入。

wltien 2007-10-25 13:22

[quote]原帖由 [i]xfxyldj[/i] 于 2007-10-25 10:09 发表 [url=http://www.onefx.net/bbs/redirect.php?goto=findpost&pid=138995&ptid=33397][img]http://www.onefx.net/bbs/images/common/back.gif[/img][/url]
通过导航窗口加入。 [/quote]

谢谢版主,已经搞定了!

另外,我不熟悉编程,请问MT4中的指标(indicator) 和script有何分别?:yct43

xfxyldj 2007-10-25 15:30

回复 6楼 的帖子

指标(indicator)每当有新报价,都会运行一次。
脚本(script)只在加载的时候运行一次。然后就退出了。(如果有死循环另说)

wltien 2007-10-26 01:07

[quote]原帖由 [i]xfxyldj[/i] 于 2007-10-25 15:30 发表 [url=http://www.onefx.net/bbs/redirect.php?goto=findpost&pid=139114&ptid=33397][img]http://www.onefx.net/bbs/images/common/back.gif[/img][/url]
指标(indicator)每当有新报价,都会运行一次。
脚本(script)只在加载的时候运行一次。然后就退出了。(如果有死循环另说) [/quote]

谢谢版主的解说.........

MACD 2008-7-25 18:06

:yct63
页: [1]
查看完整版本: 请问版主是否有发邮件警示的指标?