Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2618-standardlibrary-cchart-cchartindicatoradd.md
T
2026-06-23 21:47:51 +08:00

30 lines
983 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# IndicatorAdd
Adds an indicator with the specified handle into a specified chart window.
```
bool  IndicatorAdd(
   int   sub_win         // number of the subwindow
   int   handle          // handle of the indicator
   );
```
Parameters
sub_win
[in]  The number of the chart subwindow. 0 means the main chart window. if the number of a non-existing window is specified, a new window will be created.
handle
[in]  The handle of the indicator.
Return Value
The function returns true in case of success, otherwise it returns false. In order to obtain information about the [error](/en/docs/constants/errorswarnings/errorcodes), call the [GetLastError()](/en/docs/check/getlasterror) function.
See also
[IndicatorDelete()](/en/docs/standardlibrary/cchart/cchartindicatordelete), [IndicatorsTotal()](/en/docs/standardlibrary/cchart/cchartindicatorstotal), [IndicatorName()](/en/docs/standardlibrary/cchart/cchartindicatorname).