script to download historical data

 
I have a script that writes the values of technical indicators per candle, but I do not know how to get the script to run on a specified date range.  If I attach the script to a chart it counts backwards the number of candles from the current date which is a limitation because I want to get the data as far back as I can for even a one minute chart.  I have ran an EA for 2001-2002 and attached the script and yet it still counted back from the current date.  I have also tried setting the 'max bars in chart' parameter to unlimited, but it seems to not work with a million or more candles
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Client Terminal Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Client Terminal Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Client Terminal Properties - Documentation on MQL5
 

If your 'script' doesn't work, you have to fix it, not ?

EDIT: Is your question about mql5 or mql4 ?

script for data download - MQL4 forum
  • www.mql5.com
script for data download - MQL4 forum
Reason: