EA Programming

OK…After 5 straight days of coding for 10-12 hours each day, I finally finished writing and debugging my latest strategy EA! :smiley: Too bad that it totally drained my account regardless of which pair I back tested with over the past year. No…wait…that’s not true. My $250.00 USD/CHF account (trading .1 mini lots at $.10/pip) ended the year only down $7.36. That’s as close as I’ve gotten to a “holy grail.”

The upside is that I feel very well versed with MQL4 now, so if you have a strategy you’d like help with or even completely coded, let me know.

I have visions of an EA that can plot accurate S/R lines, detect the current trend, and even recognize certain candle pattern signals. I obviously have too much time on my hands. :rolleyes:

1 Like

I was wondering if you could take your new found MQL knowledge and tell me why I can’t get a damn email from the cowabunga MT4 indicator?

I set the thing to “True” where it says send mail but where does it send the mail to???

There is no input for the mail, so how can it know where to sent it? I searched through the code and there is no input.

So my question to you is can you tweak the program so it allow an input for email and then you can also put in you cell number as email format to get a text on you phone!

I have an indicator that alerts you when the ema crosses another sma but I want you to see if you can tweak it so you can choose either or. So for example you have a pull down menu for both MA’s so you can have a simple ma or a exponential ma or a exponential and a simple cross or both be exponential. And if you can top it off by having an email feature. I’m going ot post the two that I have and I would appreciate it if you could take a look.

I don’t believe you can specify the address in the EA itself. That is done in the Tools - Options - Email tab in MT4. Just specify your mail server, i.e. mail.yourmailserver.com:25 (the :25 is the specific port your ISP uses), your username and password, then your actual e-mail address. As for texting your phone, check with your service as they’re all different and vary with your phone/plan. Once the information is added, hit Test to send a test message then check the Journal tab to see if it sent. Hope this helps.

I found the setting for gmail in this thread.

Incoming and Outgoing Mail Server Settings for Hotmail, Yahoo, Google GMail, AOL and more

But it’s not working for me. Also can you tweak that indicator i posted to do what I want I made another thread about it.

Are you using the entire address with the port, as smtp.gmail.com:465? If that doesn’t work I don’t know what else to tell you on that end.

I read the other post and I will have a look at the indicator and see what I can do.

The arrows part is easy. Add this to the top of the code along with the other external variables:

extern bool Draw_Arrows=true;

Then in the indicators initialization section put the four lines that take care of the arrows inside an if block as:

if(Draw_Arrows==true)
{
SetIndexStyle(2,DRAW_ARROW,EMPTY,3,Blue);
SetIndexStyle(3,DRAW_ARROW,EMPTY,3,Red);
SetIndexArrow(2,SYMBOL_ARROWUP);
SetIndexArrow(3,SYMBOL_ARROWDOWN);
}

That will take care of that. I’ll keep working on the rest.

Thanks so much, yest I am using the correct port and checked my gmail settings to make sure everything is ok. I found this, a dll file that lets the mail function work. But I can’t find the actual dll file!!!

Tools - Send email with attachment from MetaTrader (Mail Anywhere)! | www.metatrader.info

Crazy huh.

Thanks see if you can figure out how to paint the candle a different color. Which one are you working on? The file i posted here or the in my other thread?

I think it would be better for the community if you could add those “features” to the Cowabunga system. A lot of people would appreciate it. In the mean time I’m going to try and learn some more MQL.

Ok these are the things I was looking to add to the cowabunga system or the other ema cross over system I posted in my other thread. These are some very good features and would be appreciated by many here.

  1. It currently has an email feature, but there is no input for the user for where the email should go. Adjust the properties menu to allow the user to input his/her email. [B] (already figured this out, I can’t make mine work)[/B]

  2. The sound alert does not work (at least from what I can tell). Adjust the properties menu to allow the user to point to sound file in the computer directory.

  3. The program shows arrows when the Moving Averages cross but does not show the moving average lines themselves. Adjust the properties menu to allow the user to change the color of the drawn MA’s and whether they should appear or not.

  4. The program draws an arrow at each cross over. Adjust the properties menu to allow the user to toggle showing an arrow “on” or “off”

  5. The program was badly coded and need to be more user friendly. Adjust the properties menu to allow the user to input whether he or she would like EMA or SMA via a dropdown menu for each Moving Average. For example he/she may want two EMA’s or one SMA and one EMA.

  6. Allow a feature that would change the candle color when the MA’s cross. So for example I use Green and Red candlesticks, but when the Ma’s cross I want it to change the color of the candle to purple. The user should be able to input what color it changes to.

Hello,

Could you kindly do an EA for me based on this simple combination?
A cross of these 2 EMA’s and RSI above or below 50 mark

EMA 5 applied to close, shift 0
EMA 8 applied to open, shift 0

The system is, when EMA 5 cross below EMA 8 and the RSI is below 50mark.

and when EMA 5 cross above EMA 8 and the RSI is above the 50mark

I would want the EA to have the following characteristics

  1. A sound alarm
    2 Allow to change the cross to ur desired setings i.e. if you want the EA to signal a EMA5 cross above EMA 8 or EMA 5 cross below EMA 8

  2. Applicable/adjustable to any time frame and currency pair

Thanks

Greetings bkr1969

As I’m now in between jobs, I was wondering if you could let me know where I learn about writing my own EA scripts.

Thanks in advance

Hi there i have an EA that needs some modifications, you can take a copy of the EA to use if you like, it is giving me some good results, let me know if your interested.

Thanks

google mq4 documentation - - this site is awsome -

I look to know, EA programming is a automated program? bcoz, people are asking, the why cant use custom controlled software? Share your thought on needs!

Hi Elliot

I am relatively new to coding EA’s & Scripts, but I find that if you are looking to learn it is really hard as total newbie to write something from scratch. Find that as a starting point some times it helps to find an existing EA that does something similar to what you hope to achieve & take apart line by line this will help you get a feel for what stuff does & when you find the bit you need you can copy & paste it into your EA.

I have written a number of mlq4 programs this way, I am now just starting to write them from scratch now. (MLQ4 is the programming language that you write EA’s for MetaTrader4)

Google mlq4 Codebase for an excellent resource page, it not only has all the manuals for all the code functions, but 1000’s of EA’s made by other programmers

I hope this is helpful

James

Thank you jjbev! There are many programmers are there… I like to know, customized programs are really getting great Ablauts?