Download MetaTrader 5
To add comments, please log in or register
Does your signal already have a lot of of subscribers? It's time to think about the paid subscription!
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2006.05.05 10:16 

New article Expert Advisor Sample has been published:

The principles of MQL4-programs development are shown on sample of creating a simple Expert Advisor system based on the standard MACD indicator.

Author: MetaQuotes Software Corp.

MQL4 Comments
MQL4 Comments 2007.06.26 09:05  

Would like to see this article extended to show a couple of templates that are good for the autotrade competition.

ie. number of open positions, money managment rules.

ie. a safe starting point, able to push the boundaries of leverage but within competition rules.

Whattaya think ?

MQL4 Comments
MQL4 Comments 2007.08.01 18:17  
What is the purpose of these two variables:
extern double MACDOpenLevel=3;
extern double MACDCloseLevel=2;

Thanks in advance,

MQL4 Comments
MQL4 Comments 2007.10.16 21:44  


I'm highly interested in this EA ,but can you explain the following, MACD OPEN LEVEL and CLOSE LEVEL?

Thank you.

MQL4 Comments
MQL4 Comments 2009.09.11 23:49  

Very nice EA sample !!!

Great work, thanks !!! =)

molanis 2010.03.02 17:04  

Good for beginners. If you don't feel like coding/programming or learning MQL try a strategy builder. It's a visual tool to create expert advisors in seconds. No need to code.

You can get it at

Check this demo video

We also have tools to create custom indicators!

MQL4 Comments
MQL4 Comments 2010.05.06 02:07  

Great article, learned a lot from this!

Best Forex Robot

Forex Robot

MQL4 Comments
MQL4 Comments 2010.08.18 23:29  

You can create from simple EAs to very flexible EAs without much work and programming with online tool at

Money and risk management are added by default into every EA, which you create online. Also, if your strategy fails, you can look how it would work with reversed rules in several seconds: it would require to cange only one EA input in MetaTrader.

Adding various trailing stops, hour filters or martingale is as simple as selecting checkbox on web site.

You can also create very advanced EAs which trade with different rules on different market conditions, stop trading automatically when conditions are not in favor of a strategy. Also, stop loss and take profit can be adapted to the market conditions.

bswen 2011.07.15 05:56  

Expert Advisor Builder with true Visual Programming interface. Try it on

LukeB 2011.12.30 17:29  
Here are 6 things I'd want considered in an EA besides just the mechanics of using the trading functions:

1) Entry Conditions - what conditions must be met for order creation, such as the MACD signal above

2) Order Size and funds at risk - what is the maximum amount or percent of the available funds that can be lost, closely related to 3.

3) Stop Loss Rules - closely related to 2, how should the Stop Loss be set and adjusted, for example, the trailing stop in the above example.

4) Take Profit - How should the Take Profit be set and adjusted, for example, set a take profit 2 ATR above the entry price. If the platform dies, have some chance of getting a profit better than just accepting the stop loss.

5) Exit Rules - Dynamic conditions for Closing the order, such as the changed MACD signal in the above example.

6) Risk Re-set - What must occur between one entry signal and the next such that the ea should accept the risk of entering the market. Should a new order happen any time the signal becomes true, or should the ea wait awhile or have an intervening event such as a swing low or high between orders in the same direction?

To add comments, please log in or register