| / | Articles |
Articles
Features
Secrets of the MetaTrader 4 Client Terminal: Indicators
To post a new articles, please log in or register
|
Secrets of the MetaTrader 4 Client Terminal: Indicators [ ru | cn ]One cannot imagine the analysis of financial markets without technical indicators at the present time. You can create your own indicators or use the embedded ones. The embedded indicators work faster than the custom ones and have a number of features that cannot be implemented in custom indicators. For example, there are indicators that can be attached to a chart both in the main window and in a subwindow. Besides, indicator can be calculated not on price and/or volume values, but on the values of another indicator. Clever use of the embedded indicators will help to go far without diving into programming the own ones. There are thirty embedded indicators in the MetaTrader 4 Client Terminal. Conditionally, all indicators can be divided into four groups:
Trend indicators help to allocate price movement in one direction and detect, synchroniously or delayed, the moments when trends turn. Oscillators allow to detect such turns synchroniously or in advance. Bill Williams' indicators have properties of both oscillators and trend indicators. Volumes analyze not the price movements as they are, but the amount of ticks that have income during the bar. Summary Table of Embedded Indicators CharacteristicsUsing the links in the table, you can view the code source of a custom indicator that correponds with the embedded one.
Type
Separate/main
Association with s/m: Whether the indicator can or not be associated with the indicator already attached in a subwindow (s) or in the main window (m). Additional lines: Additional lines, Previous Indicator's Data and First Indicator's Data, appear in the "Apply to" field in the indicator's properties window when the indicator is being dragged. ![]() Previous Indicator's Data - data of the latest indicator attached to the main window or to a subwindow. If there are no attached indicators, the Previous Indicator's Data are the chart data. And the indicator to be attached will be built based on the Close price of the chart. First Indicator's Data - data of the indicator that was attached as the first to the main window or to a subwindow. If there are no attached indicators, the First Indicator's Data are the chart data. And the indicator to be attached will be built based on the Close price of the chart. Period/shift: Availability of fields with corresponding names in the "Parameters" tab of the indicator's properties window. ![]() Apply to: Availability of the "Apply to" field in the "Parameters" tab of the indicator's properties window. ![]() МА Method: Availability of the field of the same name in the "Parameters" tab (choice of moving average building method). Levels: Availability of the "Levels" tab. How to Attach Indicators to a ChartAn indicator can be attached to a chart in six ways:
The first five ways do not differ from each other fundamentally. Let us call them default modes of indicator attaching. At this, the indicator will be drawn either in the chart or in a separate subwindow, as by default.The fifth method, the dragging, is more interesting. Some indicators, when dragged into the chart, can be calculated from values of another indicator already attached to the chart. There are seven "special" indicators:
Embedded indicators can be combined with other indicators or calculated on values of other indicators. At combining, the indicator to be attached is just displayed over the indicator already attached, but has its own scale and borders. In this case, the values of the indicator to be attached are calculated from the chart price values. An embedded indicator that is displayed in a subwindow by default can be combined with the indicator already attached in the subwindow.An embedded indicator that is displayed in the main window by default can be combined with the indicator already attached in the main window. Most embedded indicators can only be attached as in the default mode. Those seven "special" indicators can be attached both to the main window and to a subwindow. How to Attach to the Main Window Indicators that Are Opened in a Subwindow by DefaultIndicators below are opened in a subwindow by default:
Let us study properties of these indicators by the example of Commodity Channel Index. As it was already mentioned above, this indicator will be opened in a separate window
by default: ![]() To attach CCI to the main window, one has to drag it to the chart. The indicator's
properties will look as given below: ![]() Actually, the chart is at the same time the indicator. So, if no other indicators are available, First Indicator's Data and Previous Indicator's Data - are data of the chart itself, and the drawing method on the previous indicator's values does not differ from that on the first indicator's values in any way. Thus, to attach indicator into the chart window, one has to drag-and-drop it to the chart and select First Indicator's Data or Previous Indicator's Data. The obtained result: ![]() Indicators Momentum, Relative Strength Index and Standard Deviation are attached to the chart window in the same way. How to Attach to a Subwindow Indicators that Are Opened in the Main Window by DefaultIndicators of this group are listed below:
Let us consider Moving Average as an example. By default, this indicator looks as follows: ![]() Attachment of the MA to a separate subwindow, it is necessary to make some more actions than for the previous example. First of all, a separate window must be "created". For this, let us attach to the chart any indicator that can be opened in a subwindow. For example, MACD. ![]() Now, we can drag the Moving Average into the MACD window and select Previous Indicator's Data or First Indicator's Data in the properties window (since there is only one indicator in the subwindow, the MACD, it will be both the first and the last indicator). When a number of indicators are attached to one subwindow, it is always possible to detect, which of them on which is built. Selection of Previous Indicator's Data is displayed as "->", that of First Indicator's Data - as "=>". ![]() ![]() We have obtained MACD with Moving Average superimposed on it. We can stop at this, but we can also do so that only Moving Average will remain in the window. To do so, it is necessary to remove MACD. But, if we just remove it, the Moving Average, as indicator built on the MACD values, will be removed, as well. So, let us detach Moving Average from MACD first. Let us calculate on, for example, Close values. ![]() Now, the MACD can be removed, the Moving Average will remain in the separate window. ![]() Thus, combining properties of different indicators, one can build a rather complicated system. Some Common Properties of Indicators Attaching
How to Build LevelsSome indicators allow building of levels. For MA, one can build a channel using levels. To do so, it is necessary to go to the "Levels" tab and set some values using the "Add" button. ![]() ![]() Now, if we make the MA line colored the same as the background, we will obtain channel built on the moving average. ![]() "Visualization" TabIn the end, let us consider one more property of indicators in the MetaTrader 4 Client Terminal. All indicators, both embedded and custom ones, have this property. Moreover, it can apply to objects, as well, i.e., to graphical and technical analytical tools. There is no secret that data analyzed on different timeframes of the same symbol can differ. Different technical tools can be used, including different indicators with different settings. The following can be done in order not to re-adjust indicators again and again when switching between timeframes: Specify in the indicator properties window that timeframe, to which the selected indicator will be anchored. ![]() And so on for all indicators and on all timeframes. In future, when switching between them, we will be able to see different indicators on different timeframes. It remains just to save the template to be used in future for other symbols. Example: On timeframes of H1 and M15, the same indicators, MACD and MA, are attached, but with different periods.
![]() ![]() Translated from Russian by MetaQuotes Software Corp.
Original article: http://articles.mql4.com/ru/180 Warning:
All rights to these materials are reserved by MetaQuotes Software Corp.
Copying or reprinting of these materials in whole or in part is prohibited.
Would it be possible using the embedded indicators to get a MACD in a subwindow that uses RSI as its data source? Great article! Thanks, Ace
2007.09.28 08:20 Ace
1 comment
|