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];
}
}
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....

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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];
}
}