MetaTrader 4のヘルプ
MetaTrader 4のヘルプAuto TradingExpert AdvisorsLaunch

Launch

After general parameters have been set up, experts can be launched. To do so, it is enough just to attach the expert to the chart. The "Attach to a chart" command of the "Navigator – Expert Advisors" window context menu or double click with the left mouse button on the selected expert in the same window allows to impose it into the active chart.

EA_add

"Drag'n'Drop" technique allows to impose the expert into any chart. At that, the window of the expert special settings will appear.

ea_common

In its "Common" tab, it is possible:

  • Positions – select the direction of position opening:
    • Long&Short – in both directions;
    • Only Long – only for buying;
    • Only Short – only for selling.
  • Enable alerts – enable/disable the expert to alert;
  • Disable alert once hit – disable alerts after the first alert has been given;
  • Allow live trading – enable/disable live trading. Note that even if this option is enabled, the autotrading for the Expert Advisor may be disabled by the general settings of the terminal.
  • Allow DLL imports – enable/disable imports of functions from DLL files;
  • Allow import of external experts – enable/disable calling of functions from external experts;
  • Allow modification of Signals settings – this option allows/prohibits an MQL4 application subscribing and unsubscribing from Signals as well as changing the settings of signal copying. The functions for working with the base of Signals from an MQL4 application allow performing your own analysis of the quality of signals, dynamically manage the subscription and adjust risks. More detailed information about the functions for managing the signals is provided in MQL4 Reference.

External variables of the expert can be changed in the "Inputs" tab.

ea_inputs

These are variables of extern class. To save an input, one has to double-click with the left mouse button on its value and write the new one. At that, one can change the value of each variable or download the set of inputs already saved (the "Load" button). One can save the current set of external variables using the button of the same name.

The "Reset" button returns all default settings. Parameters defined in the terminal settings are given in the "Common" tab. And parameters defined in the program source code are set as inputs. To attach the expert with the new parameters to a chart, one has to press "OK". To cancel the expert imposing, one has to press the button of the same name.

Attention: Only attached experts can be set up individually. However, while current executing, the window of the expert properties cannot be opened. This can be done only during intervals between calls of the start() function. At that, the expert will not be launched until its properties window is closed. If the expert inputs were changed, the expert will be re-initialized with its new inputs at pressing of "OK".

After an expert has been set up, it will be initialized and, as soon as a new tick incomes, execute. Expert is attached if its name and a smiley can be seen in the upper right corner of the chart. If live trading is disabled in the expert settings, a L will appear instead of the smiley. A dagger (û) means that all experts are disabled.

Attention: Only one expert can be attached to a chart. If another expert is imposed, the previous one will be deleted from the chart.