Liquidity_Predator/Utilities/M_GetCandleData.mqh

17 lines
418 B
MQL5
Raw Permalink Normal View History

2026-01-31 07:59:15 +01:00
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
{
2026-02-11 19:29:28 +01:00
string Message = "CopyRates() " + EnumToString(TimeFrame) + " Error: " + IntegerToString(GetLastError());
M_LogError(Message);
2026-01-31 07:59:15 +01:00
return false;
}
}