Guarda come scaricare robot di trading gratuitamente
Ci trovi su Telegram!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Indicatori

Demo_IndicatorSetString - indicatore per MetaTrader 5

Visualizzazioni:
5726
Valutazioni:
(20)
Pubblicato:
2013.08.02 19:23
Aggiornato:
2016.11.22 07:32
Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

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

Using the #property compiler directives for the indicator, which is drawn in a separate window, you can specify the required horizontal levels, for example:

//--- display three horizontal levels in a separate indicator window
#property indicator_level1 30
#property indicator_level2 50
#property indicator_level3 70

In addition, the IndicatorSetString() function can be used for adding labels to each level and even changing the labels dynamically when necessary:

//--- Set descriptions of horizontal levels 
   IndicatorSetString(INDICATOR_LEVELTEXT,0,"First Level (index 0)");
   IndicatorSetString(INDICATOR_LEVELTEXT,1,"Second Level (index 1)");
   IndicatorSetString(INDICATOR_LEVELTEXT,2,"Third Level (index 2)");

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 description of the first horizontal level use the zero index:

IndicatorSetString(INDICATOR_LEVELTEXT, 0, "First Level")
  //- Index 0 is used for setting the text description of the first level.


Example of using the IndicatorSetString() function


Tradotto dal russo da MetaQuotes Ltd.
Codice originale https://www.mql5.com/ru/code/1760

Simple Hedge Panel Simple Hedge Panel

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

Demo_IndicatorSetInteger Demo_IndicatorSetInteger

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

DeMarker_HTF DeMarker_HTF

DeMark's oscillator with an option of setting a fixed timeframe for the calculation of the indicator in the input parameters.

RoundLevels RoundLevels

The RoundLevels indicator draws two closest "round" levels above the current price and two more below it