Sooper Articles - MQL4 For Automated Forex Trading

There are many platforms available for trading forex and one of the popular one is metatrader4 from metastock. It is a powerful software platform for trade execution, chart indicator trading and expert advisor software. This expert advisor is programming codes written to automate the trading strategy to allow the computer to trade like a human. MQL4 or MetaQuotes Language is the programming language for programming of trading strategy.

MQL4 Program Structure
The programming structure and syntax resemble C language. The programming language has similar data types, operation & expressions, operators, function and variables declaration. It comes with preprocessor and predefined variables, init(), deinit() and start() which run your main program codes. Below are some important function that you will be using in your programming

Date & Time Functions

This is a group of functions that provides trader with access to data of the datetime type. It comes with handy selection of available function for quick access to Day, Month, Year, TimeHour, TimeMinute and others. This is particular usefull if you wan to limit your program to run during certain quite hours or only selected weekdays of every week. You can also program block out date for news release that will major impact the currency price.

Technical Indicator Functions

This is a group of functions used specifically for technical chart trading. MQL comes with really to use indicator for more then 30+ custom indicator. The list includes and not limited to Simple Moving Average, Bollinger Bands, Commodity Channel Index, Moving Average Convergence/Divergence, Relative Strength Index, Stochastic, etc

Trade Functions

This group of functions for executing trade related order and management of trade issues. You can execute trade open and trade close, selection of particular trade, retrieve the order history, change order parameters like stop loss, profit take, etc and also check the order status. The most commonly used are OrderSend(), OrderModify() and Orderclose().

Account Functions

This group of function is for management of account information. This is particular important if you are checking and limiting the account information and performing money management. You can create checking statement for account number, name and company. In additional, you can check account balance, equity, margin and leverage for calculating your lot size.

Common Functions

This group of function contains alert, comment and pop out message box to notify trader user of any issue for the program. I personally use it to alert low account balance to ask user to top up their trading account balance and alert user if they are not using the correct trading current for the Expert advisor, require them to double check.

File Functions

Many programs may not use this as this may not be relevant to their trading strategy but I used it to store some account information, date, time and some trades order information. This is usefully if you want your program to pickup from last running state when encounter program crash, hang or power failure. I personally tested and find this very usefull when you running on VPS or dedicated server where power outage may happen at 0.1% (99.9% uptime) or maintenance time (where your server will be off and restart).
You can find my codes in my Best Forex Ranking Cook Book Zip files for working *.MQL4 files. For more information visit my website bestforexranking dot com.


Finally, the first comprehensive guide to MQL programming is here! Expert Advisor Programming guides you through the process of developing robust automated forex trading systems for the popular MetaTrader 4 platform. In this book, the author draws on several years of experience coding hundreds of expert advisors for retail traders worldwide. You'll learn how to program these common trading tasks, and much more: - Place market, stop and limit orders. - Accurately calculate stop loss and take profit prices. - Calculate lot size based on risk. - Add flexible trailing stops to your orders. - Count, modify and close multiple orders at once. - Verify trading conditions using indicators and price data. - Create flexible and reusable source code functions. - Add advanced features such as timers, email alerts and Martingale lot sizing. - Avoid common trading errors and easily troubleshoot your programs. - Adjustments for fractional pip brokers and FIFO. - Plus, learn how to create your own custom indicators and scripts! Whether you're a beginner or an experienced programmer, Expert Advisor Programming can help you realize your automated trading ideas in the shortest amount of time. This book features dozens of code examples with detailed explanations, fully-functioning example programs, and reusable functions that you can use in your own expert advisors!

Expert Advisor Programming: Creating Automated Trading Systems in MQL for MetaTrader 4 Click here to for more amazon customer reviews and rating... 

No comments:

Post a Comment

Top Forex Automated Trading Expert Advisor (EA)


Forex EAROI (Monthly)Profit FactorMax Draw DownS3 ScoresStar RatingAlexa.com
FAP Turbo207%31.770.32%280 points5 starsRank 31,123
GPS Forex Robot28%3.935.68%260 points4 starsRank 283,290
Forex MegaDroid19.8%NANA250 points4 starsRank 72,310
Leo Trader Pro32%2.855.84%250 points4 starsRank 213,570
Forex BulletProof11%1.3219%250 points4 starsRank 309,467
Million Dollar Pips925%2.132.58%240 points4 starsRank 75,635
Forex Growth Bot148%1.669.05%190 points3 starsRank 214,229
Forex Over Drive5.8%NA21%190 points3 starsRank 453,393

Fully editable *.mq4 files that compile successfully with no errors (3MB zip file with 200+ EA codes. Including 40+ strategies from the Strategy Book. You can download the Free Strategy Book by joining my email newsletter on the right side of this website. Click "Buy Now" to make payment and instant down the Best Forex Ranking Cook Book at USD $79 (One time payment only) Click here for more info

Please inform me if unable to purchase or download (send to sngerge@gmail.com)