Place this script into MT4's MQL --> Script folder. Restart and run the script in MT4. Might need to run it twice. This force loads historical candles data.