Liquidity_Predator/Utilities/M_GetCandleData.mqh
2026-02-11 19:29:28 +01:00

17 lines
No EOL
418 B
MQL5

bool M_GetCandleData(ENUM_TIMEFRAMES TimeFrame, MqlRates &CDL[], int NrOfCandles)
{
ArraySetAsSeries(CDL, true);
bool copied = CopyRates(_Symbol, TimeFrame, 0, NrOfCandles, CDL);
if(copied)
{
return true;
}
else
{
string Message = "CopyRates() " + EnumToString(TimeFrame) + " Error: " + IntegerToString(GetLastError());
M_LogError(Message);
return false;
}
}