Expert Advisors
MQL4 helper functions for calculating bar sizes
Here are some more MQL4 helper functions for MetaTrader. You can use them in your expert advisors and custom indicators. The three functions will allow you to quickly get the size of the upper and lower wicks of the candle stick, and also the size of the candle stick body. To use them you will also need some of the code I gave you in my simple [...]
Simple MetaTrader MQL4 helper functions
Here are some simple functions that you can use in your forex expert advisors and custom indicators written in MQL4 for MetaTrader. If you split out commonly used functionality into separate functions with logical names (as I’ve done here) then you should find that your MQL4 code becomes more readable. If you use these functions in your [...]
Disadvantages of expert advisors
Following on from my advantages of expert advisors post here are some disadvantages of trying to write and use expert advisors. Curve fitting Because it is easy to backtest expert advisors many times with different parameters it is very easy for them to suffer from curve fitting. Curve fitting means that the EAs are highly optimised for [...]
The Expert Advisor advantage
For most people trading in forex is a very manual process. It involves watching charts, indicators, and the news. They then have to work out in their head whether it is a good time to buy or sell. For some strategies this makes a lot of sense. For example if you trade based on news events then you need to be there to interpret how the news will [...]
Implementing an assert in MetaTrader MQL4
MQL4 is a very useful programming language for creating expert advisors to automatically trade FOREX. However the language does have many omissions which you will soon notice if you are used to programming a more complete language such as Java or C++. One of the big omissions is that there is no built in way to do an ‘assert’ when running [...]









