Display indicator plots in EA

 

All,

I have two indicators that draw on the chart and display a plot in a separate window. I have an EA that uses the indicators, but when I add the EA to a chart it does not display the plots. It draws the varius lines and arrows on the chart, but no plot. Do I need to specify anything special in the EA to ensure the indicators are plotted when the EA is attached to a charts?

This is the indicator when attached to a chart.

This is the chart when the EA is attached.

Thanks, Ian

 
You have to attach the indicators separately if you want to see their plot. EA doesn't attach an indicator to a chart, it just uses its data.
 
Documentation on MQL5: Standard Library / Class for working with chart / IndicatorAdd
  • www.mql5.com
Standard Library / Class for working with chart / IndicatorAdd - Documentation on MQL5
 

Thanks Enivid, I didn't know that. My indicator draws on the chart though (lines and arrows and text) and all that stuff appears. Just not the values in the separate panel. I nanually added them, and I now see the separate panel, but I'm not sure if the indicator is doing double work now, drawing all my lines and stuff twice.

Thanks amir_avatar. I'll give that a shot!

;-) Ian

Reason: