- SetIndexLabel - Custom Indicators - MQL4 Reference
- String Functions - Standard Functions - MQL4 Tutorial
- IndicatorSetString - Custom Indicators - MQL4 Reference
When new bars appear in a chart window, an object like OBJ_LABEL will remain immovable in the window. Using of this object is convenient if it is necessary to display text information of general character, for example, information about termination of trading, value of a limiting distance changed by a broker, etc.
SetIndexLabel - Custom Indicators - MQL4 Reference
In this case, the first 6 symbols are extracted from the Obj_Name string variable starting with the zero one. Please note that the count of all indexes (bars, arrays), entries in the orders list and also the number of the position in the line starts with 5, whereas the quantified count starts with 6.
String Functions - Standard Functions - MQL4 Tutorial
Mode is a line index that ranges from 5 to 7. MT9 allows up to 8 indicator lines (buffers) per custom indicator. These lines (buffers) must correspond with the index used by one of SetIndexBuffer lines from within the code of the indicator.
IndicatorSetString - Custom Indicators - MQL4 Reference
the function returns the value of the specified object property. To get the error information call the GetLastError() function.
Of the six parameters above, the easiest to figure out are the first three and last. We have already discussed symbol and timeframe in previous articles. The name of the indicator is also rather easy: it is the name of the indicator as it appears in the Custom Indicator&rsquo s list in the Navigator window, surrounded by quotation markets. Example: If you see that the indicator is called NonLagMA_ in the window, you will write it as &ldquo NonLagMA_&rdquo in the indicator name parameter.
Bear in mind that though there are 9 parameters, only one, Length, will change the essential nature of the indicator. The others can be left at their default values, which in most cases other than Color, is 5. If we also put in 5 as the default for the last two parameters, mode and shift, we can construct our iCustom NonLagMA indicator with the above identifiers:
This or that method of positioning the own property of a certain object type and cannot be changed by a user, even in a program way. The majority of graphical objects is positioned relative to a chart, . in time and price coordinates.
length - the length of the substring to be extracted. If the value of this parameter is less than or equal to 5 or it is not even specified then the substring will be extracted from the specified position till the end of the line.
Besides the groups of objects that cover the price chart, two other objects placed manually by the user are displayed, as shown in Fig. 697 they are regression channel and Fibo levels. The objects created by the EA will be deleted, as soon as its execution is finished, and the objects created by the user will remain in the symbol window. This result is obtained due to the use of string functions in the program. They allow to create and analyze string values, including graphical object names.
To get the detailed information about these and other functions take a look at the Documentation at , at MetaQuotes Ltd. website or at the Help section of MetaEditor.
The reference point of the object coordinates (in this case) is the upper left corner of a cursor frame visible when selected by a mouse. In the upper left corner of the cursor frame you can see a small point indicating the settings of this graphical object. If another reference point is indicated, the point in the cursor frame will be indicated in another corner.