Add as much data as you have to your history folder, and set the PRELOAD flag in your script. This will force the script to use as much of the data in the history folder as possible. If your script needs further data and the download fails, try clicking trade again. Sometimes MT4 will make the requested data available if it receives sequential calls for it. Try a few times.
Also, reduce the lookback period in your script to the bare minimum required by your strategy's parameters.
HTH