MQL4 - automated forex trading   /  

Documentation

Login | Register | Language: ru cn en
Freelancers needed to develop Expert Advisors for traders

MQL4 Reference Custom Indicators

Custom Indicators

This is the group functions used in the creation of custom indicators. These functions can't be used when writing Expert Advisors and Scripts.

Function

Action

HideTestIndicators

The function sets a flag hiding indicators called by the Expert Advisor

IndicatorSetDouble

Sets the value of an indicator property of the double type

IndicatorSetInteger

Sets the value of an indicator property of the int type

IndicatorSetString

Sets the value of an indicator property of the string type

SetIndexBuffer

Binds the specified indicator buffer with one-dimensional dynamic array of the double type

IndicatorBuffers

Allocates memory for buffers used for custom indicator calculations

IndicatorCounted

Returns the amount of bars not changed after the indicator had been launched last

IndicatorDigits

Sets precision format to visualize indicator values

IndicatorShortName

Sets the "short" name of a custom indicator to be shown in the DataWindow and in the chart subwindow

SetIndexArrow

Sets an arrow symbol for indicators line of the DRAW_ARROW type

SetIndexDrawBegin

Sets the bar number from which the drawing of the given indicator line must start

SetIndexEmptyValue

Sets drawing line empty value

SetIndexLabel

Sets drawing line description for showing in the DataWindow and in the tooltip

SetIndexShift

Sets offset for the drawing line

SetIndexStyle

Sets the new type, style, width and color for a given indicator line

SetLevelStyle

Sets a new style, width and color of horizontal levels of indicator to be output in a separate window

SetLevelValue

Sets a value for a given horizontal level of the indicator to be output in a separate window

Indicator properties can be set using the compiler directives or using functions. To better understand this, it is recommended that you study indicator styles in examples.

All the necessary calculations of a custom indicator must be placed in the predetermined function OnCalculate().