How To Start Out in Automated Forex Trading (EA's)

Thanks for the post, been looking for this stuff, now I got something to read :stuck_out_tongue:

Im an embedded guy so my background is asm and c

Hey Chris,

Then you should have no problems learning MQL4! :smiley:

Clark

Yeah I have just checked the examples and it look straight forward. The problem is I dont know how to trade and dont have algo yet LOL. Anyway its good to know how to do these stuff, it will be a long way before Im coding my own EAs.

Well considering you have a solid background in C, youā€™ll be leagues ahead of everyone in about 2 hours!

Thatā€™s exactly what I did. Only I started with C++. Itā€™s all good now. Iā€™m by no means a total expert, but I can get through it. I find scripts, and things that are close to what I need, and modify from there. CodeMeister and Goldylox here on the site graciously helped me fill in some blanks. Hatā€™s off to both of them:)

Itā€™s getting easier. I still run into situations occasionally that kinda stump me for a bit, but I dig around enough, and finally a light bulb goes off with the answer. Order handling is still a bit mystifying. There are so many things you can use inside of other things. That was one of the things that really isnā€™t clear with the Coderā€™s Guru stuff. Why would I use braces here? And why parentheses here? And why does this get a semi colon, but this doesnā€™t? And why would I ask it to return that?

Simple questions, and simply explained. But definitely taken for granted as syntax by most coders that wrote tutorials.

I even bought a video tutorial from someone that cost me $150 bucks. It helped as bunch, but NONE of them use examples that actually show you HOW to code. Saying things like:



extern double = a;
extern double = b;

  double functionC()
      {
         double c=(a+b);
         return (c);
       }


is useless. I would have liked to have seen simple working examples instead of things like that.

Make it count. Show me WHY I need braces there, and the function of them.

Anyway, itā€™s all good now for the most part. I still know I have a ton to learn, but itā€™s getting clearer than the mud it once was:D

Cheers!

So would you consider trading knowledge your strength then, Mr. Tang, compared to what you know about coding?

Question: If you can successfully trade manually, why bother with learning to code? Would you really trust the computer to see what you see and make trades for you?

I consider myself in the coder category but limited mql experience until now. However, knowing how to code an EA or script does not translate into profits or a successful strategy. I believe automation does have itā€™s place though.

How do others on this forum, particular members of the Honorary FX men, see themselves?

My problem, is not being able to figure out how to code EA on Offline chart, been working on it for weeks

If you are simply looking for a tick to test your code when the chart is offline, there is a free program called mt4ticker that will do this.

Two reasons.

  1. To be able to sleep nights again.

  2. To lower risk. My systems (yes plural) are mechanical. Iā€™m not always awake to see the moment of a trigger for them. And my signals work on just about every pair. If I am sitting there watching one, I miss a signal on another. If I can teach the computer to do it, it NEVER misses a signal, and since it can watch 10 or so pairs, I can lower risk on each by a factor of 10. With the 85%+ winning percentage, my drawdown will be less, because it wonā€™t occur at the same time as itā€™s spread across a basket of pairs.

As for trusting the computer to make trades, I absolutely do. I make a visual indicator to watch as I run the tests to make sure my entry and exit rules are working as they should be. If I see a glitch, I stop the test, and try to identify why it missed a trade, or close of one. Itā€™s pretty satisfying to see it tick along by itself never missing an entry.

On the other hand, if you think you have a great system, and automating it will be the answer, be prepared for a shock when the computer truly sees every signal, and your rock solid strategy melts away into one long string of losses. ā€œBack to the drawing boardā€ has never been truer;)

Itā€™s been an adventure. And an awesome mental exercise. I donā€™t run backtests without them being visual, and the screen time speedup really shows you the rhythm of the market. Itā€™s a great way to get some intensified visual training.

Cheers!

Itā€™s great to see so much activity on this thread over the weekend!

Sorry if some of these items have already been covered, but I will start off with the on how to start trading an automated system. Apologies if this is over simplistic for some of you, but this is newbie island!

  • First, you will need to register an account with an MT4 capable broker. MT4 is a trading platform that is offers the flexibility of programming customised indicators and trading systems. For example - you could program (or find one that has already been built) a system to enter a trade when two simple moving averages crossed, then exit the trade when they cross back on themselves. Once itā€™s coded the system will trade under these rules automatically. So you can sit back and relax while the software does all the work. You can see why this is so cool!
    (there are other platforms that offer the ability to code automated systems, however 99% of traders use MT4)

  • Second, play around with MT4 on a DEMO account until you feel comfortable opening and closing trades. Itā€™s not a very user friendly platform, so you should try and work out the basics before you start looking at attaching indicators and expert advisors.

  • Third, find yourself an expert advisor that looks interesting (Iā€™ll explain how to identify a good one shortly) and attach it to your DEMO charts. There are normally detailed instructions on how to do this on the instruction manuals for the expert advisor.

  • Fourth, wait for it to trade!

It is that easy to start automated forex trading. Hopefully you can see why Iā€™m so keen on it. In my next post I will explain the different things to watch out for when identifying a good and bad expert advisor.

Ok, so now you should be set up so that you can load an Expert Advisor (EA) onto your charts. This is the exciting part.

Choosing an EA that is going to make you rich!!! (if you believe all the marketing pages)

Sorry to disappoint you - but an EA isnā€™t going to set you up for life. I have traded with dozens of these over the last few years, and many teased me with strong consistent profits for a month or two. But it didnā€™t lastā€¦

That doesnā€™t mean that automated trading is doomed, if you are not greedy, and able to adopt the strategy as the market changes then I believe itā€™s more profitable than pure manual trading.

So, how do you find an EA that is going to make you money and protect your capital?

First Rule - Ignore every statement and testimonial on the marketing page! These are designed to tap into your emotions, donā€™t let it happen.

Second Rule - Listen to other traders experiences that are not affiliated with the EA. The best place to find this information is on a forum like this, look for people that are trading successfully with an established EA with at least a month (preferably 3) worth of verified history through Myfxboook or MT4i.com. Donā€™t rely on Metatrader account statements, they are too easily doctored.

Third Rule - Donā€™t listen to people that make statements like ā€œMartingale will loose all your moneyā€ or ā€œGrid EAā€™s are for chumpsā€ (these are specific strategies, do a search for them if you want specific information). Now, Iā€™m not advocating either of these strategies specifically, all Iā€™m saying is that almost any strategy can make money if itā€™s correctly applied. Some EAā€™s that use a specific strategy will lose, but that doesnā€™t mean the strategy is completely flawed. It may have failed for a dozen different reasons.

Fourth Rule - Invest in an EA that is being constantly updated and improved as the market changes. Almost every developer that I have bought an EA from sell it via a one time payment. The EA will make money for a while, then when it stops working the developer will move onto the next project. There is no incentive for them to keep modifying their old creation, because once they have their money they have lost the motivation to improve it. On my site the EAā€™s and signal services that we sell are offered on a subscription basis, so the signal providers and developers are motivated to keep the system as relevant and profitable as possible over a longer term period.

Any questions?

Cheers,

Nick

Will you teach us how to program an EA or give us general guidelines?
Or will you now give us a link to your site?

Iā€™m not a programmer. I have dabbled in it in the past, but coding is better left to those with the patience to work through hundreds of lines of code.

I outsource the coding, but I have designed a couple of basic EAā€™s in conjunction with some programmers.

My site is Free Forex Trading Room - Free Forex Signals - Live Forex Trading

Convert the EA to a script, should be fairly straightforward

  1. Rename start() function in EA to start_0()
  2. Create new start() function and call the start_0 function inside it:

int start()
{
    while(!IsStopped()) {
        start_0();
        Sleep(500);
    }
    return(0);
}
  1. And donā€™t forget to tell MT4 that the code is now a script, by placing the mql4 file in the scripts folder

THanks Harry, going to try this right nowā€¦

Is this where you will pop back in the thread in a few days with the price of your EA?

Sorry, its just, this thread is uselessā€¦

My point exactly.
Teach us how to program an EA or stop this thread.

This guy has given a link to his site. There you can subscribe to different EAs.
For each EA you subscribe through his site he gets some percentage of the fees.
At this point this is just an elaborate advertising trick.

Dear Nick, please prove that you are not a salesman. Otherwise just leave.

not sure why he even posted it here, he could have just posted it with his other pitches in the Experts Forum, HERE AT BABYPIPS, lolā€¦

Hey, I have an EA, I will sell for $1

Dread, check out Expert Advisor Builder for MetaTrader 4

Its a good place to start things offā€¦

its good for very simple systems, then you can add things to it by plugging in codesā€¦

My problem is, I have been doing this for 14 months, and still have problems, even simple things, takes me like a week to figure out code placement, its just hard for me to understandā€¦

But, im getting better, ugggggā€¦

Like, Where does this go,

//--------------------------------------------------------------------
int My_Function() // Custom funct. description
{
Count++; // Counter of calls
}
//--------------------------------------------------------------------