This tag is associated with 5 posts

Extern variables not updating after editing “Expert Advisors -> Properties” (F7 shortcut)

I see this tripping up MT4 programmers enough that it warrants a post. A quick background for the uninitiated, Metaquotes structured MT4 EAs with 3 main event processes. init(), start() and deinit() This is clean, minimal and logically sound. init() runs ONCE on starting up, or when editing your EA properties, allowing you to do … Continue reading

MetaTrader 4 Client Terminal Build 509 (Compile error addressed)

Metaquotes promptly resolved the compiler error with build 509. Good going!

MetaTrader 4 Client Terminal Build 507 (MetaEditor compile error)

New build. Features and updates as announced here. With the release of build 500 and its forcing of update for existing builds above 482, there’s been quite a bit of ire from developers. Justly so because newer builds tend to break some functionality, see and build 417 errorneous return of double from the DLL functions. And it’s … Continue reading

Do mql4 AND and OR operators have short circuit evaluation?

Some background on short circuit evaluation (skip this if you already know what it is): Examine this if statement with a logical OR operator: If there is short circuit evaluation(“SCE”), as long as the leftmost condition fulfills, the entire if OR statement fulfills and passes control to the next line. If there is no SCE, … Continue reading

Maximum Relative Drawdown in MT4

This post is split into 3 parts. Part 1 explains how MT4 records Relative Drawdown, which is not well understood. Part 2 will show my code to calculate Relative Drawdown against Balance just prior to a trade, which I inherently find much more useful. Part 3 shows the mql4 code for calculating and displaying this … Continue reading



Flag Counter