Hi,
I would like to just get the value of a custom indicator in an Expert Advisor, here is my code :
double IndicatorBuffer[];
int HandleIndicator = 0;
int OnInit()
{
HandleIndicator = iCustom(Symbol(),PERIOD_CURRENT,"MAindicator","EURUSD",PERIOD_CURRENT);
Print("iCustom HANDLE "+HandleIndicator+" ERR? "+GetLastError());
if(HandleIndicator > 0)
int CpyHandle = CopyBuffer(HandleIndicator,0,0,3,CorrelationBuffer);
Print("Cpy HANDLE "+CpyHandle+" ERR? "+GetLastError());
}
}
Is it the correct way to get a value of a iCustom indicator ?
Why do I get this error ?