거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
5725
평가:
(20)
게시됨:
2013.08.02 19:23
업데이트됨:
2016.11.22 07:32
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

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


MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: 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