stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Script to (ATTEMPT) Force Download of historical data
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=254
Page 4 of 6
Author:  tonycashflow [ Fri Aug 03, 2012 6:25 pm ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

HI NeoTrader,

I tried something and noticed it only happens when I get hst files from external sources from tick data or hst files from another broker's database.
Author:  NeoTrader [ Fri Aug 03, 2012 8:24 pm ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

hi tonycashflow,
How big is your hst file? If I remember correct Empty4 can only address 2GB or 4GB of Data. Maybe this is the Problem.

Only a thought...

happy weekend,

NeoTrader
Author:  disbellj [ Tue Oct 30, 2012 8:00 pm ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

Matt,

I have tried all the history-loading stuff given in this thread, and yours win hands-down. 10 mins vs. 30 mins to 1.5 hrs on others.

I have a basket EA I've built and first tried making the offline chart bars limited by making MaxBars 1000 instead of using IndicatorCounted code ( i-- instead of i++ ). Offline charts always got corrupted when restarting Empty4. Now instead of limiting bars in my code, I use iBars (so not limiting history in code), and limit bars in Empty4 options to 2048 (the default that gets downloaded when I use your script/EA). May not be enough bars for others, but its good enough for my offline chart(s) needs. Thanks!

BTW, I second Steve's request for print-out to chart of everything getting printed to experts tab. This should be pretty easy to do, and I'll do it (or try to) if if don't want to take the time. :)

Thanks again!

Kindest regards,

Don
Author:  cybernick [ Fri Nov 02, 2012 8:01 am ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

I have an issue whereby I imported price data from Alphari, but that resulted in a 2 weeks gap in my data. using the script to force download doesn't seem to solve this issue. any ideas how i can fix this?
Thanks
Author:  gaheitman [ Fri Nov 02, 2012 11:03 am ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

cybernick wrote:I have an issue whereby I imported price data from Alphari, but that resulted in a 2 weeks gap in my data. using the script to force download doesn't seem to solve this issue. any ideas how i can fix this?
Thanks
Right-clicking on the chart and choosing Refresh should fill in the gap if the data is available at the broker.

George
Author:  hndymann [ Sun Nov 04, 2012 1:38 am ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

This is amazing!
Author:  cybernick [ Sun Nov 04, 2012 11:28 am ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

gaheitman wrote:
cybernick wrote:I have an issue whereby I imported price data from Alphari, but that resulted in a 2 weeks gap in my data. using the script to force download doesn't seem to solve this issue. any ideas how i can fix this?
Thanks
Right-clicking on the chart and choosing Refresh should fill in the gap if the data is available at the criminal.

George
Thanks! That worked! :D
Author:  cybernick [ Sun Nov 04, 2012 12:05 pm ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

cybernick wrote:
gaheitman wrote:
cybernick wrote:I have an issue whereby I imported price data from Alphari, but that resulted in a 2 weeks gap in my data. using the script to force download doesn't seem to solve this issue. any ideas how i can fix this?
Thanks
Right-clicking on the chart and choosing Refresh should fill in the gap if the data is available at the criminal.

George
Thanks! That worked! :D
Looks like I still have gaps in my data on the M1 time frame though...
Author:  gaheitman [ Sun Nov 04, 2012 12:33 pm ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

cybernick wrote: Looks like I still have gaps in my data on the M1 time frame though...
You could also go into history center and delete all of the M1 data for that currency and start fresh by opening a new chart. I had a pair recently that refused to update and had to go this route.

George
Author:  eigenvector [ Fri Feb 08, 2013 7:34 am ]
Post subject:  Re: Script to (ATTEMPT) Force Download of historical data

mbkennel wrote:Here's a script I cooked up to ATTEMPT to download historical data on all found symbols.

Sometimes iBars() forces a read, sometimes it doesn't work. Why? Empty4.

It Print()s messages to Experts, so read it to see what didn't work. Try it again, or go do those pairs manually by opening a chart and changing to every time frame and trying PageUp.

UPDATE: new improved version uses error checking as described below, puts up Alert() at end for failures.
I've been experimenting with auto downloading data lately myself. From my tests I don't think any of the predefined variables (Bars, Close, etc.) or timeseries access functions (including iBars, iClose, etc.) download any data. You can force data to load the 2048 bars by referencing MarketInfo() for the given symbol. At least that seems like how it works. But the data loaded seems to be only temporary, meaning the next time you run the script it will say there is no data for X symbol, and the script will have to load the data again. Or maybe upon unload of the script / EA / indicator the data leaves memory.

Bar download (from your broker, not Metaquotes) is tied to the symbol's chart. There isn't any way to load more than 2048 data without actually loading those charts on the given timeframes. This process can be automated, however.

I found one (untested) tool that says it does just that and likely runs in the background:

http://codebase.mql4.com/6693

I ran a full download on Cowboy IBFX with my own solution and it took 2 hours 10 minutes to download about 32 symbols.
All times are UTC Page 4 of 6