I have some fairly basic test code integrate with the indicator from the market. I am having huge problems getting any data back and would really appreciate any assistance anyone could provide...
The code just takes the first buffer and the second bar. I get no errors from the handle or result but the buffers are zero.
Hoping someone can just confirm if the code looks OK or have I missed something. Thanks.
int CS28;
double testBuffer[1];
datetime prevStrengthCalcM5;
intOnInit()
{
//---
CS28=iCustom(_Symbol,PERIOD_M5,"Market\\Advanced Currency Strength28 MT5","","",true,true,23);
int error=GetLastError();
Print("Handle error: "+IntegerToString(error));
//---return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Expert deinitialization function |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
//---
}
//+------------------------------------------------------------------+//| Expert tick function |//+------------------------------------------------------------------+voidOnTick()
{
//---if (prevStrengthCalcM5!=iTime("EURUSD",PERIOD_M5,0))
{
int result=CopyBuffer(CS28,0,1,1,testBuffer);
if (result>=0)
{
Print("testBuffer: "+DoubleToString(testBuffer[0]));
int error=GetLastError();
Print("Error: "+IntegerToString(error));
prevStrengthCalcM5=iTime("EURUSD",PERIOD_M5,0);
}
}
}
I have some fairly basic test code integrate with the indicator from the market. I am having huge problems getting any data back and would really appreciate any assistance anyone could provide...
The code just takes the first buffer and the second bar. I get no errors from the handle or result but the buffers are zero.
Hoping someone can just confirm if the code looks OK or have I missed something. Thanks.