Archive

Posts Tagged ‘MetaEditor’

Top 10 Shortcuts in MetaTrader 4

November 15th, 2011 Comments off

d0ac2101615b2841e3f44bd946ce727b Top 10 Shortcuts in MetaTrader 4

I have been helping a lot of customer install, setup and use MetaTrader 4 recently and although its not our preferred platform it defiantly has a place in the trade world for beginners or someone who wishes to have a minimal cost setup. I would even go as far as to say that its a good platform for automated order execution.

I have written this list of my top 10 shortcut keys int MetaTrader 4 that I think are very handy and can defiantly speed up using the platform and make it less of a drag! Like anything if you learn to use your tools properly the rest will come easy…. In theory f058206bb8ff732dbe8e7aa10d74c9cd Top 10 Shortcuts in MetaTrader 4

Left Arrow — chart scrolling to the left.
Right Arrow — chart scrolling to the right.
Page Up — fast chart scrolling to the left.
Page Down — fast chart scrolling to the right.
F12 — move the chart by one bar to the left.
Shift+F12 — move the chart by one bar to the right.
Ctrl+P — print the chart.
F11 — enable/disable the full screen mode. – This one is great for MetaTrade 4 as it can look a bit clunky sometimes
Ctrl+I — call the “Indicators List” window. – Dealing with indicators all day long this has become my favourite!
Ctrl+N — open/close the “Navigator” window. – Navigator is a handy little tool in MetaTrader 4 but can take up alot of room so this shortcut can save time.

Above are my top 10 but I have included all the others i know exist in MetaTrader 4 below.

Numpad 5 — restoring of automatic chart vertical scale after its being changed. If the scale was defined, this hot key will return the chart into the visible range.
Home — move the chart to the start point.
End — move the chart to the end point.
“-” — chart zoom out.
“+” — chart zoom in.
Delete — delete all selected graphical objects.
Backspace — delete the latest objects imposed into the chart window.
Enter — open/close fast navigation window.
Esc — close the dialog window.
F1 — open this “Userguide”.
F2 — open the “History Center” window.
F3 — open the “Global Variables” window.
F4 — download MetaEditor.
F5 — switch to the next profile.
F6 — call the “Tester” window for testing the expert attached to the chart window.
F7 — call the properties window of the expert attached to their chart window in order to change settings.
F8 — call the chart setup window.
F9 — call the “New Order” window.
F10 — open the “Popup prices” window.
Shift+F5 — switch to the previous profile.
Alt+1 — display the chart as a sequence of bars (transform into bar chart).
Alt+2 — display the chart as a sequence of candlesticks (transform into candlesticks).
Alt+3 — display the chart as a broken line (transform into line chart).
Alt+A — copy all test/optimization results into the clipboard.
Alt+W — call the chart managing window.
Alt+F4 — close the client terminal.
Ctrl+Z — undo object deletion.
Ctrl+A — arrange all indicator windows heights by default.
Ctrl+B — call the “Objects List” window.
Ctrl+C — copy to the clipboard.
Ctrl+E — enable/disable expert advisor.
Ctrl+F — enable “Crosshair”.
Ctrl+G — show/hide grid.
Ctrl+H — show/hide OHLC line.
Ctrl+L — show/hide volumes.
Ctrl+S — save the chart in a file having extensions: “CSV”, “PRN”, “HTM”.
Ctrl+W — close the chart window.
Ctrl+Y— show/hide period separators.
Ctrl+D — open/close the “Data Window”.
Ctrl+M — open/close the “Market Watch” window.
Ctrl+O — open the “Setup” window.
Ctrl+R — open/close the “Tester” window.
Ctrl+T — open/close the “Terminal” window.
Ctrl+F6 — activate the next chart window.
Ctrl+F9 — open the “Terminal — Trade” window and switch the focus into it. After this, the trading activities can be managed with keyboard.

Source: www.theindicatorguys.com

New Version of MetaTrader 4 Client Terminal Build 399

April 18th, 2011 Comments off

New MetaTrader 4 Client Terminal build 399 has been released.

  1. Fixed margin calculation for hedged positions in the CFD-Leverage mode of margin calculation.
  2. Fixed excess initialization of calculation buffers of custom indicators.
  3. In MetaEditor, fixed navigation though a file with the tab spacing equal to 1.
  4. Fixed errors reported on the forum and in crash logs.

The live update will be available through the LiveUpdate system.

The Debugger – a novelty of MetaTrader 5

April 1st, 2010 No comments

One of the upgrades brought by MetaQuotes to the MetaEditor IDE is the introduction of a debugger.

Across this article I’ll use the article ‘error’ as a reference to the conceptual code errors such as wrongly written conditions or wrongly written calculus expressions… Warning: don’t mistake them with the errors signaled by the compiler.

For the ones that don’t know , the purpose of the debugger is to run line by line to code in order to find conceptual programming errors, and to watch the values of the variables realtime.

In MT4, that lacked a debugger, the programmers were using the Print function to find the errors in the code, this being the single method available. This method is difficult to use and the time needed to find the error is way larger compared to using a debugger, because Prin needed a recompilation every time, re-attaching the EA and reading in logs. If we were calling functions giving a wrong result , because they were badly written, we had to go inside that function and attach Print lines to see where were the errors. After repairs, the code had to be cleaned up of redundant Print lines used to find the error.

Right now the debugger works only to test scripts, but we think it will be integrated with the Strategy Tester to work with experts. This is needed also because several buggy EA modules may be run only in rare market conditions, that will not appear while forward testing, but will be revealed while backtesting.

Now the things got simpler, from the same window you can follow the program being run line by line.

In order to use the debugger we have to call the DebugBreak() function where we want the normal execution stopped in order to start execution line by line. If we attach such a script to a chart, this will not stop running, as it will be stopped only if it’s started with the debug mode of the MetaEditor.

To start the script for debugging we have to press Debug->Start or F5 key or it’s dedicated button in the special bar dedicated to the debugger, bar which contains other 3 buttons for passing thru the code.

The group of buttons from the rectangle labeled 1 are the 6 buttons used at debugging. The first 3 buttons are getting in and out from the debug mode, but also to pause. The last 3 buttons are for passing the code in other manners, in the debug mode:

- passing thru the code by Step Into (F11) we go line by line but we enter the functions referred. For instance if we are with the cursor on the line ‘p=prod(a,b)’ and we push Step Into then the cursor will go into the ‘prod’ function and we will be be able to go line by line thru the code of this function;

- passing thru the code by Step Over (F10) we go line by line thru the code but the debugger will jump over called functions (these will be executed, but not line by line in a debug mode).

- Step Out should make the debugger get out of the function where the cursor is, and not close the debug mode, thing which is happening now.

The green arrow labeled with 2 is the current line. If we push F10 (Step Over), the arrow will move to the next line.

Running a code in the Debug mode a new page opens within the Toolbox pageframe, which is divided in two (areas 3 and 4).

In area 3 we see the name of the file that’s being run, the name of the function and the number of the line where we are in the debug mode.

Area 4 is similar to the Watch window from Borland C++ / Borland Pascal or other older IDEs , where can be watched realtime the values and types of variables.

In picture above in area 4 we have 3 variables which we follow : a, s and p. The variable ‘a’ has the value of 5 because we passed the line ‘a=5? where we are initializing it. The variable ‘p’ has the value 0, because this is the default value taken by the integer variables when they are defined, while ’s’ is undefined, because that’s the stop where the execution is stopped, right before it being declared.

These being said I wish you luck writing codes and debugging them.

Source – mqlmagazine.com

MetaTrader Tips – Expert Advisor Installation

November 16th, 2009 No comments

MetaTrader Expert Advisors file should have the file extension of .ex4 (compiled code) or .mq4 (sourse code). First it is necessary to copy this file to the folder Experts of the MetaTrader working directory (usually C:\Program Files\MetaTrader Broker Name or MetaTrader).

experts

The second step is to restart MetaTrader. After the restart the expert should be added to the list of experts in the Navigator window. It necessary to stress that the colored icon corresponds to mq4 file. If you have an ex4 file only, an icon in the window Navigator will be grey. The same grey color may mean that the errors in a source code appeared.

expert_errors

navigator1

In order to check errors in the EA, you can press F4, the editor of language MQL4 , and then it is necessary to load the source code of expert into the editor. Press F5 in order to compile the expert advisor. In case of success, the sentence ’0 errors’ will appear in conclusion window. Warnings are not errors and their presence does not hinder the successful compiling.

What Is Automated Trading

November 3rd, 2009 No comments

Modern technologies allow us not only to trade in financial markets using personal computers, but we can fully automate a trading system now. Using a computer program you can relieve yourself from the routine of analyzing financial markets and performing trades.

Our client terminal has all functions that allow you to develop, test and use your trading system. The development environment named MQL4 is integrated into the terminal. MQL4 consists of MetaEditor, Strategy Tester and Compiler.

To view the full article, please visit: http://www.metatraderglobal.com/384/what-is-automated-trading/