Download MetaTrader 5

'iMACD_buf_signal_line' - parameter conversion not allowed

To add comments, please log in or register
Marcelo Coutinho
1200
Marcelo Coutinho  

Hi there!

I have an EA with iMA, iBands and iMACD. Any idea why iMACD is presenting one error in the signal line?

Documentation says nothing about differences between buffers.

(...)

input string            temporar4=" ";                // Configuração do MACD
input int               iMACD_fast_ema_period=12;     // Período da Rapida
input int               iMACD_slow_ema_period=26;     // Período da Lenta
input int               iMACD_signal_period=9;        // Período do Sinal

(...)

int         iMA_fast_handle,iMA_slow_handle,iBands_handle,iMACD_handle;             // Handles dos indicadores
double      iMA_buf_fast[],iMA_buf_slow[];                                          // Buffers das MM
double      iBands_buf_base_line[],iBands_buf_upper_band[],iBands_buf_lower_band[]; // Buffers da Banda
double      iMACD_buf_main_line[],iMACD_buf_signal_line;                            // Buffers MACD

int OnInit()
  {
(...)

   iMACD_handle=iMACD(my_symbol,my_timeframe,iMACD_fast_ema_period,iMACD_slow_ema_period,iMACD_signal_period,PRICE_CLOSE);

   if(iMACD_handle==INVALID_HANDLE)
     {
      Print("Failed to get the iMACD_handle handle");
      return(-1);
     }

   ChartIndicatorAdd(ChartID(),0,iMA_fast_handle);
   ChartIndicatorAdd(ChartID(),0,iMA_slow_handle);
   ChartIndicatorAdd(ChartID(),0,iBands_handle);
   ChartIndicatorAdd(ChartID(),0,iMACD_handle);

   ArraySetAsSeries(iMA_buf_fast,true);
   ArraySetAsSeries(iMA_buf_slow,true);

   ArraySetAsSeries(iBands_buf_base_line,true);
   ArraySetAsSeries(iBands_buf_upper_band,true);
   ArraySetAsSeries(iBands_buf_lower_band,true);

   ArraySetAsSeries(iMACD_buf_main_line,true);
   ArraySetAsSeries(iMACD_buf_signal_line,true); << 'iMACD_buf_signal_line' - parameter conversion not allowed

   return(0);
  }
Alain Verleyen
Moderator
33486
Alain Verleyen  
YouTrade:

Hi there!

I have an EA with iMA, iBands and iMACD. Any idea why iMACD is presenting one error in the signal line?

Documentation says nothing about differences between buffers.

double      iMACD_buf_main_line[],iMACD_buf_signal_line;                            // Buffers MACD
Not an array.
Marcelo Coutinho
1200
Marcelo Coutinho  
angevoyageur:
Not an array.

I knew there was no difference ! LOL

Sorry about this ! Thank you !

To add comments, please log in or register