how to let EA read several lines indicator?

 

Please if 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
i tried several parameters, no success...
thanks in advance,
Samir Dirgham
Files:
 
samirgham:

Please if 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
i tried several parameters, no success...
thanks in advance,
Samir Dirgham

double iCustom(



string symbol, int timeframe, string name, ..., int mode, int shift)

mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.

You just have to look into indicator's code and see which buffer corresponds to which line of the indicator.

 
robofx.org wrote >>

double iCustom(

string symbol, int timeframe, string name, ..., int mode, int shift)
mode

- Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.

You just have to look into indicator's code and see which buffer corresponds to which line of the indicator.

Thanks robofx

the indicator shows

//---- indicator buffers mapping
SetIndexBuffer (0, UperBuffer);
SetIndexBuffer (1, ci);
SetIndexBuffer (2, DownBuffer);

i did as follows:

double envU=iCustom(NULL, 4, "at_Itp4_Env",0,0);
double envL=iCustom(NULL, 4, "at_Itp4_Env",0,2);

also tried

double envU=iCustom(NULL, 4, "at_Itp4_Env",OBJPROP_COLOR,Lime);
double envL=iCustom(NULL, 4, "at_Itp4_Env",OBJPROP_COLOR,Red);

same result i got,

i only need upper and lower lines, but still not reacting with orders.

if you please check the indicator attached, may be they are floating lines.

Thanks

 
samirgham:

samirgham,

try this code:

double envU=iCustom(Symbol(), 0, "at_Itp4_Env",0,1);

double envL=iCustom(Symbol(), 0, "at_Itp4_Env",2,1);


This will calculate upper and lower line on the current chart, current timeframe for the last closed bar.

If you want to calculate the indicator values for the current bar use this:

double envU=iCustom(Symbol(), 0, "at_Itp4_Env",0,0);

double envL=iCustom(Symbol(), 0, "at_Itp4_Env",2,0);


Good luck!

 
robofx.org wrote >>

samirgham,

try this code:

double envU=iCustom(Symbol(), 0, "at_Itp4_Env",0,1);

double envL=iCustom(Symbol(), 0, "at_Itp4_Env",2,1);

This will calculate upper and lower line on the current chart, current timeframe for the last closed bar.

If you want to calculate the indicator values for the current bar use this:

double envU=iCustom(Symbol(), 0, "at_Itp4_Env",0,0);

double envL=iCustom(Symbol(), 0, "at_Itp4_Env",2,0);

Good luck!

i tried all combinations, not working yet.

This indicator is complicated, very slow in testing consuming all memory and CPU, and it crashed the terminal several times, uninstalling and re-installing terminal, i forgot it.

Thanks Robofx for your help

Reason: