I have been troubleshooting this for hours now... I am trying to CopyBuffer the following custom indicator line:
I get the runtime error here with [cannot load indicator 'Moving Average' [4002]] message.
Based from the test script the testHandleICustom is != INVALID_HANDLE and I should have no problems in using the CopyBuffer function with it.
Also the Print function from the iMA+ATR indicator was also called in the printout message window.
I have no issues using the iMA+ATR as an indicator in the chart, and I can figure out what did I missed? Since I have been trying to fix this for also 8 hours now, I think I need some help with fresh eyes to review my code. I provided everything below. Any input and insight will be appreciated.
Below is the printout messages of the test script.
Below is the test script:
Below is the iMA+ATR.mp5 custom indicator. Its a simple Moving Average indicator with upper and lower bands of ATR value. For reference here is the code.
remove the groups from the indicator inputs

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have been troubleshooting this for hours now... I am trying to CopyBuffer the following custom indicator line:
I get the runtime error here with [cannot load indicator 'Moving Average' [4002]] message.
Based from the test script the testHandleICustom is != INVALID_HANDLE and I should have no problems in using the CopyBuffer function with it.
Also the Print function from the iMA+ATR indicator was also called in the printout message window.
I have no issues using the iMA+ATR as an indicator in the chart, and I can figure out what did I missed? Since I have been trying to fix this for also 8 hours now, I think I need some help with fresh eyes to review my code. I provided everything below. Any input and insight will be appreciated.
Below is the printout messages of the test script.
Below is the test script:
Below is the iMA+ATR.mp5 custom indicator. Its a simple Moving Average indicator with upper and lower bands of ATR value. For reference here is the code.