DRAW_LINE draws a line of the specified color by the values of the indicator buffer. The width, style and color of the line can be set using the compiler directives and dynamically using the PlotIndexSetInteger() function. Dynamic changes of the plotting properties allows "to enliven" indicators, so that their appearance changes depending on the current situation.
The number of buffers required for plotting DRAW_LINE is 1.
An example of the indicator that draws a line using Close prices of bars. The line color, width and style change randomly every N=5 ticks.
Note that initially for plot1 with DRAW_LINE the properties are set using the compiler directive #property, and then in the OnCalculate() function these three properties are set randomly. The N parameter is set in external parameters of the indicator for the possibility of manual configuration (the Parameters tab in the indicator's Properties window).