At the moment, we just use InitCount, which is used in posts following. The inputs tab is an important one because this is where you would define important global variables such as Lot Size, Stop Loss and Profit Target values.
#PERIOD CONVERTER MT4 BUILD 600 CODE#
There is even a version number "1.00" which is also in the computer generated code posted earlier. Notice some of the settings that you inputted earlier are displayed. A properties dialog box is displayed as shown on the below right diagrams. Open up a chart, then right click on EA101_01_01a and select Attach to a chart. Now in MetaTrader, you should be able to see your EA name in the Experts Advisors branch of the Navigator Pane/Tree ("EA101_01_01a") as seen in below left diagram (if not, restart MetaTrader). I find it quite useful to create a desktop shortcut to the MQL4 directory as it saves time from clicking on 20 folders. If you can't find where your files are stored, then when you first open MetaTrader, click on the Journal tab in the bottom Terminal pane and it will display a message like:
#PERIOD CONVERTER MT4 BUILD 600 WINDOWS 7#
In Windows 7 64 bit, it's usually C:\Users\User\AppData\Roaming.\MQL4\Experts\ as seen in below right diagram. The diagram on the right shows the files created for this EA in Windows Explorer. In MetaEditor, the bottom Toolbox pane (not shown here) shows the source file name and if there are any errors/warnings. Now click Compile to generate the object code used to run the EA. The copyright and link has also been copied. Notice the computer generated code for variable InitCount which we created earlier. Make sure all of these are unchecked and click Finish.Īfter unchecking all checkboxes in Tester event handlers dialog and clicking finish, the MetaEditor window displays the template code used to build the EA as shown in below left diagram. There is a third dialog that involves Tester event handlers which is not shown here. Now perform the actions shown in the below left diagram and click Next.Īs shown in below right diagram, make sure everything is unchecked and click Next. Then in MetaEditor, select New or File/New to bring up the MQL WizardĪnd as shown below, Select Expert Advisor (template) and click Next. In MetaTrader, select Tools/MetaQuotes Language Editor to bring up the Editor used to write EA's. To create a very basic EA, we need to do the following: Thought I'd start a basic MT4 EA 101 thread.