This page contains a Flash digital edition of a book.
STRATEGY DEVELOPMENT F I X IN G BUGS IN MQL 4


FX


MQL is a really simple scripting language. Debugging MQL, unfortunately,


Te MetaEditor


is not simple at all. compiler


that


MetaQuotes provides simply does not incorporate the advanced tools that most coders are familiar with using.


MQL BUG FIXING PROBLEMS


Visual Studio and other sophisticated IDEs (integrated development environments) incorporate a number of offerings that make it simple to fix code while the http://www.blogger.


com/img/blank.gifprogrammer writes it. Te best example of this are break points. A break point is a site in the code where the compiler informs the computer to stop executing the code when it arrives at that stipulated line.


Take the example where a trailing stop implements a new stop inaccurately. Te normal instinct for most programmers would be to run the expert advisor on the visual backtester, then introduce break points on the sections of code immediately aſter the trailing stop calculations. Break points block the code, allowing the coder to scan inside the brains of the soſtware


to see what it thought at the time it made a decision. Te key advantage in Visual Studio is that the values of all of the variables are clearly visible. It is possible to walk through the program step by step. Whenever one of the steps does not follow the desired rules, the necessary modification is usually obvious. MetaQuotes thankfully included break points in MQL5. Tey are not available in MQL4.


Te lack of full intellisense support affects more


my than


programming anything.


speed Intellisense


observes the use of reserved words like OrderSelect() or ObjectGet().


FX TRADER MAGAZINE April - June 2012 83


Page 1  |  Page 2  |  Page 3  |  Page 4  |  Page 5  |  Page 6  |  Page 7  |  Page 8  |  Page 9  |  Page 10  |  Page 11  |  Page 12  |  Page 13  |  Page 14  |  Page 15  |  Page 16  |  Page 17  |  Page 18  |  Page 19  |  Page 20  |  Page 21  |  Page 22  |  Page 23  |  Page 24  |  Page 25  |  Page 26  |  Page 27  |  Page 28  |  Page 29  |  Page 30  |  Page 31  |  Page 32  |  Page 33  |  Page 34  |  Page 35  |  Page 36  |  Page 37  |  Page 38  |  Page 39  |  Page 40  |  Page 41  |  Page 42  |  Page 43  |  Page 44  |  Page 45  |  Page 46  |  Page 47  |  Page 48  |  Page 49  |  Page 50  |  Page 51  |  Page 52  |  Page 53  |  Page 54  |  Page 55  |  Page 56  |  Page 57  |  Page 58  |  Page 59  |  Page 60  |  Page 61  |  Page 62  |  Page 63  |  Page 64  |  Page 65  |  Page 66  |  Page 67  |  Page 68  |  Page 69  |  Page 70  |  Page 71  |  Page 72  |  Page 73  |  Page 74  |  Page 75  |  Page 76  |  Page 77  |  Page 78  |  Page 79  |  Page 80  |  Page 81  |  Page 82  |  Page 83  |  Page 84  |  Page 85  |  Page 86  |  Page 87  |  Page 88  |  Page 89  |  Page 90  |  Page 91  |  Page 92  |  Page 93  |  Page 94  |  Page 95  |  Page 96  |  Page 97  |  Page 98  |  Page 99  |  Page 100  |  Page 101  |  Page 102