Error reading buffer from iCustom indicator in EA

 

Hello,

I have a struggle to read the buffers from a custom indicator.

Stange is that I get it to work in an indicator without problems, but when I try to read the value in the EA I get always an EMPTY_VALUE or  2147483647

Any help appreciated.


Thanks.

 
digisoft:

Hello,

I have a struggle to read the buffers from a custom indicator.

Stange is that I get it to work in an indicator without problems, but when I try to read the value in the EA I get always an EMPTY_VALUE or  2147483647

Any help appreciated.


Thanks.

Show your code if you need help.
 
 int signal_buysell = 0;
         if(Use_BuySellZone)
           {
            double iBuySellZone_up = iCustom(NULL,EntrySignal_TimeFrame,IndicatorFileName_MBFX,BuySellZone + 3,k);
            double iBuySellZone_dn = iCustom(NULL,EntrySignal_TimeFrame,IndicatorFileName_MBFX,BuySellZone,k);
            if(iClose(NULL,EntrySignal_TimeFrame,k) < iBuySellZone_up) if(iBuySellZone_up != EMPTY_VALUE) signal_buysell++;
            if(iClose(NULL,EntrySignal_TimeFrame,k) > iBuySellZone_dn) if(iBuySellZone_dn != EMPTY_VALUE) signal_buysell--;                      

          }    



When I use this in Indicator, no problems at all ;-(

 

Forum on trading, automated trading systems and testing trading strategies


Hello,

Please use the SRC button when you post code. Thank you.


This time, I edited it for you.


Reason: