Download MetaTrader 5
To add comments, please log in or register
Manage agents in your profile. It is easy!
digisoft
745
digisoft 2015.06.10 22:43 

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.

Alain Verleyen
Moderator
30295
Alain Verleyen 2015.06.10 23:01  
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.
digisoft
745
digisoft 2015.06.10 23:22  
 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 ;-(

Alain Verleyen
Moderator
30295
Alain Verleyen 2015.06.11 08:49  

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.


/
To add comments, please log in or register