mt4 to mt5 conversion questions

 

Hello

I have mt4 to mt5 conversion questions:

below code will not compile due to MODE_MAIN and MODE_SIGNAL mt4 keywords, what is their equivalent in mt5?

also iMACD has wrong number of parameters, can you correct?

void ann_prepare_input()

{

int i;


for(i=0;i<=AnnInputs-1;i=i+3)

{

InputVector[i]=10*iMACD(NULL,0,FastMA,SlowMA,SignalMA,PRICE_CLOSE,MODE_MAIN,i*3);

InputVector[i+1]=10*iMACD(NULL,0,FastMA,SlowMA,SignalMA,PRICE_CLOSE, MODE_SIGNAL,i*3);

InputVector[i+2]=InputVector[i-2]-InputVector[i-1];

}

}

 
supercoder2006:

Hello

I have mt4 to mt5 conversion questions:

below code will not compile due to MODE_MAIN and MODE_SIGNAL mt4 keywords, what is their equivalent in mt5?

also iMACD has wrong number of parameters, can you correct?

void ann_prepare_input()

{

int i;

for(i=0;i<=AnnInputs-1;i=i+3)

{

InputVector[i]=10*iMACD(NULL,0,FastMA,SlowMA,SignalMA,PRICE_CLOSE,MODE_MAIN,i*3);

InputVector[i+1]=10*iMACD(NULL,0,FastMA,SlowMA,SignalMA,PRICE_CLOSE, MODE_SIGNAL,i*3);

InputVector[i+2]=InputVector[i-2]-InputVector[i-1];

}

}


https://www.mql5.com/en/docs

Use SRC button to post your code

 
supercoder2006:

Hello

I have mt4 to mt5 conversion questions:



This might help some: https://www.mql5.com/en/articles/81
 
You need to create a iMACD handler and have to use it then. Refer other sample codes available at mql5.com and mql5 documentation....