25.10.2016 Views

Expert Advisor Programming by Andrew R. Young

Expert Advisor Programming by Andrew R. Young

Expert Advisor Programming by Andrew R. Young

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tips and Tricks<br />

Icon Flags<br />

These flags specify icons that appear next to the text in the message box.<br />

• MB_ICONSTOP – A stop sign icon.<br />

• MB_ICONQUESTION – A question mark icon.<br />

• MB_ICONEXCLAMATION – An exclamation point icon.<br />

• MB_ICONINFORMATION – An information icon.<br />

Return Flags<br />

These flags are the return value of the MessageBox() function, and indicate which button was<br />

pressed.<br />

• IDOK – The OK button was pressed.<br />

• IDCANCEL – The Cancel button was pressed.<br />

• IDYES – The Yes button was pressed<br />

• IDNO – The No button was pressed.<br />

Email Alerts<br />

Your expert advisor can alert you <strong>by</strong> email about placed trades, potential trade setups and more. The<br />

function SendMail() will send an email with the subject and body of your choice to the email<br />

address that is listed in the Tools – Options dialog under the Email tab.<br />

In the Email tab, you must first specify the SMTP mail server with port number – for example:<br />

mail.yourdomain.com:25 -- along with a username and password, if required. Check with your ISP or<br />

hosting provider for this information.<br />

You can use any email address in the From field. The To field is the email address to send messages<br />

to. Be sure to check the Enable setting at the top to enable the sending of messages.<br />

The SendMail() function has two arguments: the first is the subject line of the email, and the<br />

second is the contents of the email itself. You can use newlines, escaped characters, variables and<br />

constants within the body of your email.<br />

127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!