Ticaret robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Twitter üzerinde bulun!
Fan sayfamıza katılın
Komut dosyasını ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Komut dosyasını beğendiniz mi? MetaTrader 5 terminalinde deneyin
Göstergeler

Demo_IndicatorSetInteger - MetaTrader 5 için gösterge

Görüntülemeler:
5934
Derecelendirme:
(22)
Yayınlandı:
2013.07.31 21:50
Güncellendi:
2016.11.22 07:32
Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

An example of the IndicatorSetInteger() function. A simple indicator that shows how to create a label, e.g. "Overbought level" for each horizontal level.

Using the #property compiler directives for the indicator, which is drawn in a separate window, you can specify color, style and width of horizontal levels, for example:

//--- Set showing of three horizontal levels in a separate indicator window
<s1p>#property indicator_level1 20
#property indicator_level2 50
#property indicator_level3 80
//--- Set the width of horizontal levels
#property indicator_levelwidth 5
//--- Set the color of horizontal levels
#property indicator_levelcolor clrAliceBlue
//--- Set the style of horizontal levels

In addition, the IndicatorSetInteger() function can dynamically set the style for each level

//--- Set the color of the level
      IndicatorSetInteger(INDICATOR_LEVELCOLOR,level,level_color);
      IndicatorSetInteger(INDICATOR_LEVELSTYLE,level,level_style);

Styles of horizontal lines can be set by the ENUM_LINE_STYLE enumeration:

Identifier

Description

STYLE_SOLID

Solid line

STYLE_DASH

Dashed line

STYLE_DOT

Dotted line

STYLE_DASHDOT

Dash-dot line

STYLE_DASHDOTDOT

Dash - two dots

 

Note

Numbering of properties (modifiers) starts from 1 (one) when using the #property directive, while the function uses numbering from 0 (zero). In case the level number is set incorrectly, resulting indicator can differ from the intended one.

For example, in order to set width of the first horizontal line use index zero:

//--- index 0 is used to set width of the first level
IndicatorSetInteger(INDICATOR_LEVELWIDTH, 0, 5);   


Example of using the IndicatorSetInteger() function


MetaQuotes Ltd tarafından Rusçadan çevrilmiştir.
Orijinal kod: https://www.mql5.com/ru/code/1761

Gann_Hi-lo_Activator_SSL Gann_Hi-lo_Activator_SSL

A simple indicator, a good one for MQL5 beginners

PinBar PinBar

An indicator of pin bars, to be used as a built-in indicator in Expert Advisors. Shows levels specified by the pattern for the open price and stop-loss.

Simple Hedge Panel Simple Hedge Panel

A panel for opening and closing positions on several financial symbols in one click.

Demo_IndicatorSetString Demo_IndicatorSetString

An example of how to use the IndicatorSetString() function. A simple indicator that shows how to create a label, e.g. "Overbought level" for each level.