Forum

Issue with Loading Previous Data using CopyTime() in MQL5

Hi, I'm developing a custom indicator in MQL5 that uses CopyTime() to get timestamps of previous candles in the daily timeframe (D1). The problem is that after restarting MetaTrader, it seems that previous data is not loaded, and CopyTime() returns -1 . I have tried the following solutions, but none

iMA function handle returns int ?

The moving average function returns an integer value, while the moving average value of each bar is a decimal amount. How can this be explained

run indicator in specific time frame

Is there a way to make the indicator run on specific time frame