iCustom and WindowFind

 
Hi,

I'm using iCustom to call an indicator in an EA, and I keep getting "unknown subwindow number -1 for ObjectCreate function"

From what I have gathered, this is because of the WindowFind code in the custom indicator being unable to find a corresponding name. The code appears in init start() as "int li_8 = WindowFind(ls_0);"

I'm very new to coding mql4, but is there a simple way around this problem?

Many thanks
 
If you want to plot things into the chart then simply call ObjectCreate() with 0 as window number and it will use the chart window automatically even when the indicator is used via iCustom().

I cannot say anything about sub-windows and iCustom() because I have never tried this variant.
 
OK, thanks for the tips - I'll have a play around