Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2006, 02:30 PM
eastmaels eastmaels is offline
Junior Member
 
Join Date: Feb 2006
Posts: 10
eastmaels is on a distinguished road
MT4 function/EA question

Hi guys,

I'm still new with coding using MQL4 and have a question. Is it possible for an EA to send you an e-mail when it reaches/breached a certain price you've specified?

Maybe an indicator will suffice? But anyway, I'm still currently working on it and studying MQL4, but I think asking also won't hurt.

But anyway, for example, you want the EA/Indicator (whichever has the capability) to send you an e-mail once it goes above let's say 118.00 for the USD/JPY.

So what I want to happen here is I will specify the price level on which the EA/Indicator will send me an e-mail. Once it goes to that price, it will send me an e-mail.

I've already setup my e-mail in the Options -> Email tab and have already sent successfully the Test signal.

Answers are greatly appreciated.

Regards,
East
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2006, 02:39 PM
eastmaels eastmaels is offline
Junior Member
 
Join Date: Feb 2006
Posts: 10
eastmaels is on a distinguished road
Here's the code I came up with:
PHP Code:
//---- input parameters
extern double    priceAlert;

<
snip>

int start() {
   
double priceClose Close[0];
   if (
priceClose >= priceAlert) {
      
SendMail("Price Alert""Price Reached target price of : " priceAlert);
   }
   return(
0);

So my question will also be: Will the EA send mail only during forward testing and not on simulation/back testing
using MT4's testing?
And will it also recognize the price I set to "priceAlert"?

Again, I'm still new and hope you'd spare some of your time to answer my questions.

Best regards,
East

Last edited by eastmaels : 04-15-2006 at 02:43 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-16-2006, 03:43 AM
eastmaels eastmaels is offline
Junior Member
 
Join Date: Feb 2006
Posts: 10
eastmaels is on a distinguished road
Okay, got the answer.
What I want to happen can actually be done by a simple indicator.. Sweet..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
iCustom function homicida Questions 55 06-07-2008 04:36 AM
General Question on Function of Experts garciaal General Discussion 1 08-02-2006 09:30 AM
get max drawdown function harriss Metatrader 4 2 04-11-2006 11:57 PM


All times are GMT. The time now is 11:07 AM.