MQL5 Indicators - indicator_type property must be specified

 

Just double checking.

It appears that I can change any of the parameters dynamically, e.g. width, color, style, label, but I must have the indicator type as a compiler directive property, which does not ever change, e.g.

#property indicator_type1       DRAW_LINE

Is this correct?

 
Not according to Custom Indicators / Connection between Indicator Properties and Functions - Reference on algorithmic/automated trading language for MetaTrader 5

Directives for properties of indicator subwindow

Functions of IndicatorSet...() type

Description of the adjusted property of the subwindow

indicator_typeN

PlotIndexSetInteger(N-1, PLOT_DRAW_TYPE, nType)

Line type for N plot

 
Ah! Thank you @whroeder1 !
Reason: