Download MetaTrader 5

IndicatorAdd does not work

To add comments, please log in or register
Oraib
427
Oraib  

I am having hard time using IndicatorAdd, It does not even being recognized by the complier. 

IndicatorAdd

Adds an indicator with the specified handle into a specified chart window.

bool IndicatorAdd(
int sub_win // number of the sub-window
int handle // handle of the indicator
);

Andriy Moraru
1260
Andriy Moraru  

Did you include Chart.mqh library? IndicatorAdd is not the native function of MQL5.
phi nuts
2181
phi nuts  
IndicatorAdd is a class method for CChart class, if that confuse you, IndicatorAdd use mql5 function called ChartIndicatorAdd() - https://www.mql5.com/en/docs/chart_operations/chartindicatoradd
Documentation on MQL5: Chart Operations / ChartIndicatorAdd
Documentation on MQL5: Chart Operations / ChartIndicatorAdd
  • www.mql5.com
Chart Operations / ChartIndicatorAdd - Documentation on MQL5
To add comments, please log in or register