Mira cómo descargar robots gratis
¡Búscanos en Telegram!
Pon "Me gusta" y sigue las noticias
¿Es interesante este script?
Deje un enlace a él, ¡qué los demás también lo valoren!
¿Le ha gustado el script?
Evalúe su trabajo en el terminal MetaTrader 5
Indicadores

Demo_IndicatorSetInteger - indicador para MetaTrader 5

Visualizaciones:
1047
Ranking:
(22)
Publicado:
2014.01.14 13:27
Actualizado:
2016.11.22 07:33
¿Necesita un robot o indicador basado en este código? Solicítelo en la bolsa freelance Pasar a la bolsa

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 zeroth index:

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


Image:

Example of using the IndicatorSetInteger() function


Traducción del ruso realizada por MetaQuotes Ltd
Artículo original: https://www.mql5.com/ru/code/1761

Simple Hedge Panel Simple Hedge Panel

Panel para abrir y cerrar posiciones en diferentes símbolos financieros con un solo click.

Demo_IndicatorSetString Demo_IndicatorSetString

Un ejemplo de cómo utilizar la función IndicatorSetString(). Un indicador simple que muestra como crear una etiqueta, p.ej. "Nivel de sobrecompra" para cada nivel.

PinBar PinBar

Indicador de Pin Bars, que puede ser incluido en Asesores Expertos. Muestra los niveles especificados por el patron para el precio de apertura y el stop-loss.

ATRStops_v1_HTF ATRStops_v1_HTF

Indicador de tendencia implementado en forma de NRTR. Timeframe especificado en los parámetros de entrada del indicador