Link: Indicator and EA

 

Hi,


I would like to know how it's possible to link indicator and EA: what is the code in the EA ?


Shoud the indicator has to run on the chart where the EA is running or it s not necessary ?


One indicator can run or be called by two different EA ?


Many thanks


UKalgo

 
ukalgo:

Hi,


I would like to know how it's possible to link indicator and EA: what is the code in the EA ?

See this: https://docs.mql4.com/indicators


Shoud the indicator has to run on the chart where the EA is running or it s not necessary ?

Not necessary.


One indicator can run or be called by two different EA ?

Yes.


Many thanks


UKalgo

 
ggekko:


Ggekko, Thanks for your answer ! UkAlgo

 
ukalgo wrote >>

Hi,

I would like to know how it's possible to link indicator and EA: what is the code in the EA ?

Shoud the indicator has to run on the chart where the EA is running or it s not necessary ?

One indicator can run or be called by two different EA ?

Many thanks

UKalgo

1. See iCustom() function.

2. The indicator is accessed directly by the EA with the iCustom() function. The only thing you need is the actual indicator in (ex4) your experts/indicators folder.

3. Going with logic and referring to #2, yes.. An indicator can be called by a gazillion EA's if you have a powerful enough PC. It's not a shared resource but rather executed when requested.

Jon

 
Archael:

1. See iCustom() function.

OK

2. The indicator is accessed directly by the EA with the iCustom() function. The only thing you need is the actual indicator in (ex4) your experts/indicators folder.

OK

3. Going with logic and referring to #2, yes.. An indicator can be called by a gazillion EA's if you have a powerful enough PC. It's not a shared resource but rather executed when requested.

OK, so i can have some computational capacity constraint on this.

Thanks Jon

Jon


 
please anybody can help
i tried to use (at_Itp4_Env indicator) for EA, what parameters in ICUSTOM i have to write to send order to upper line and other order to lower line?
can be? this indicator is written by Nikolay Kositsin
thanks in advance,
Samir Dirgham
Files:
 

SetIndexBuffer (0, UperBuffer);
SetIndexBuffer (1, ci);
SetIndexBuffer (2, DownBuffer);

.

Those are the buffers.. If you want the value of the upper line, specify index 0. If you want the value of the lower line, specify index 2 in iCustom().

Jon

Reason: