EA design question - SetIndexBuffer work around?

 
I am working on an EA and not sure if
it is technically possible. I want to use a custom indicator
within the EA. The issue I have is the indicator uses
double b1[ ];
SetIndexBuffer(0,b1);

The code complies and loads into the chart, however

I am getting this error message:

SetIndexBuffer function must be called from custom indicator only.

Does anyone know of a way to get around using

indicator buffers in an Expert Advisor?


Thanks,

jbfajkow



 
jbfajkow wrote >>
I am working on an EA and not sure if
it is technically possible. I want to use a custom indicator
within the EA. The issue I have is the indicator uses
double b1[ ];
SetIndexBuffer(0,b1);

The code complies and loads into the chart, however

I am getting this error message:

SetIndexBuffer function must be called from custom indicator only.

Does anyone know of a way to get around using

indicator buffers in an Expert Advisor?


Thanks,

jbfajkow

use it here under mode as

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

double iCustom( string symbol, int timeframe, string name, ..., int mode, int shift)

 

Use iCustom() in EA to call up Indicator values