Download MetaTrader 5

Display indicator plots in EA

To add comments, please log in or register
Ian Harris
106
Ian Harris 2012.01.02 11:14 

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

Andriy Moraru
1261
Andriy Moraru 2012.01.02 11:44  
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.
Amir Yacoby
1195
Amir Yacoby 2012.01.02 13:33  
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
Ian Harris
106
Ian Harris 2012.01.03 13:17  

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

To add comments, please log in or register