Imported indicator into EA is not drawn !

 

Hello all,

I have a simple indicator "_iCustomIndicator" which draw a simple MM ! It works fine !

Now I want to import it into a EA si I wrote :

#import "_iCustomIndicator.ex4" at the top  of my EA ! Compilation ok but nothing is drawn !!!

What is wrong ?

Thanks 

 
 

Thanks ubzen ;-)

I've read this !  But, you mean that if my custom indicator (alone) draw a MA, I need to get back the "MA" values into my EA and re draw my MA into my EA ?

 
rpillot:Thanks ubzen ;-) I've read this !  But, you mean that if my custom indicator (alone) draw a MA, I need to get back the "MA" values into my EA and re draw my MA into my EA ?
No. Your call for iCustom is wrong. Look at the example in the document. When you use iCustom the EA will not draw. It'll get the values in the IndexBuffers. You might need to start with the book.
 

Thank's for the your answer but I think you misunderstood me ! I have NO call to the MQL4 iCustom indicator.

When I wrote : #import "_iCustomIndicator.ex4" this is just the way of importing my indicator into my EA ! "_iCustomIndicator" is the name of my indicator.

So now, Is my first post more comprehensible ?

(sorry, i'm just a beginner)

 
rpillot:

Thank's for the your answer but I think you misunderstood me ! I have NO call to the MQL4 iCustom indicator.

When I wrote : #import "_iCustomIndicator.ex4" this is just the way of importing my indicator into my EA ! "_iCustomIndicator" is the name of my indicator.

So now, Is my first post more comprehensible ?

(sorry, i'm just a beginner)

 

You can't use Indicator specific functions in an EA.
 

RaptorUK:
You can't use Indicator specific functions in an EA.

 

Ok RaptorUK ! It seems difficult for me to explain what I want to do ;-) So I try again :

1 -I have a indicator which draw un simple MA ! It works fine. I mean when I drag and drop it on my EURUSD graph in MT4, I can see the MA in a separate window. This is what I want.

2 - I wrote a empty EA. And now when  I drag and drop my empty EA on my EURUSD graph I want to see my simple MA, so I try to import this indicator by doing #import "mySimpleIndicator.ex4" in my EA ... but nothing is drawn ...

Do you understand my problem ? If yes, what is wrong ?

Thanks a lot ! 

 

 

 

 
rpillotImported indicator into EA is not drawn !
  1. Indicators are NOT imported into EA's. To get indicator's value use iCustom
  2. EA's do not have eyes, they don't need it to be drawn.
  3. If YOU want it drawn, attach the indicator to the chart with the same parameters as iCustom, or have the EA draw the lines using my polyline code.
 

Thanks WHRoeder !

I just want to do something that is not easily possible ;-)

 
rpillot:

Do you understand my problem ? If yes, what is wrong ?
Yes,  if you want an Indicator on a chart put the Indicator on the chart . . . .  why are you trying to add an Indicator into an EA ?
 

>> why are you trying to add an Indicator into an EA ?
Because I wanted to make just one drag and drop (just my EA) to run my EA and see my indicator drawing in another window ...  I thought that it was more easy to use but you're right I can just put the Indicator (call by my EA) on the chart ;-)

Thanks a lot for your answers ! 

Reason: