Hi,
I have coded a multi symbol mql5 ea which compiles fine but when I run it through the strategy tester there seems to be an issue with the CopyBuffer function. Just by looking does anyone know why this might be?
//Checking and Copying Indicator Values if(CopyBuffer(MACD_Handle[i],0,1,4,MACD_MainLine)) { Print("Error Copying Indicator Data",GetLastError()); return; } if(CopyBuffer(MACD_Handle[i],1,1,4, MACD_Signal)) { Print("Error Copying Indicator Data",GetLastError()); return; }
Thanks
Hi;
it prints the error when backtesting. It wont open any trades as there is an issue copying the indicator values.
if(CopyBuffer(MACD_Handle[i],0,1,4,MACD_MainLine)==-1) { Print("Error Copying Indicator Data",GetLastError()); return; } if(CopyBuffer(MACD_Handle[i],1,1,4, MACD_Signal)==-1) { Print("Error Copying Indicator Data",GetLastError()); return; }
If you still get an error, paste the entire code and log.
@Mr David Mcbride, please edit your previous post and use the "</>" icon or Alt-S to post your code, or attach it as a file with .
Don't just copy/paste it in plain text because it is difficult to read.
Hi,
I have coded a multi symbol mql5 ea which compiles fine but when I run it through the strategy tester there seems to be an issue with the CopyBuffer function. Just by looking does anyone know why this might be?
//Checking and Copying Indicator Values if(CopyBuffer(MACD_Handle[i],0,1,4,MACD_MainLine)) { Print("Error Copying Indicator Data",GetLastError()); return; } if(CopyBuffer(MACD_Handle[i],1,1,4, MACD_Signal)) { Print("Error Copying Indicator Data",GetLastError()); return; }
Thanks
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have coded a multi symbol mql5 ea which compiles fine but when I run it through the strategy tester there seems to be an issue with the CopyBuffer function. Just by looking does anyone know why this might be?
Thanks