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.
Script to (ATTEMPT) Force Download of historical data
-
- Posts: 3
- Joined: Mon May 28, 2012 2:03 am
- NeoTrader
- Trader
- Posts: 436
- Joined: Wed Apr 04, 2012 2:52 pm
- Location: small Village at Lake Chiemsee, Bavaria, Germany
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
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
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
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
-
- Posts: 4
- Joined: Sun Oct 14, 2012 2:41 pm
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
Thanks
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Script to (ATTEMPT) Force Download of historical data
Right-clicking on the chart and choosing Refresh should fill in the gap if the data is available at the broker.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
George
-
- Trader
- Posts: 23
- Joined: Sat Nov 19, 2011 4:01 pm
Re: Script to (ATTEMPT) Force Download of historical data
This is amazing!
-
- Posts: 4
- Joined: Sun Oct 14, 2012 2:41 pm
Re: Script to (ATTEMPT) Force Download of historical data
Thanks! That worked!gaheitman wrote:Right-clicking on the chart and choosing Refresh should fill in the gap if the data is available at the criminal.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
George
-
- Posts: 4
- Joined: Sun Oct 14, 2012 2:41 pm
Re: Script to (ATTEMPT) Force Download of historical data
Looks like I still have gaps in my data on the M1 time frame though...cybernick wrote:Thanks! That worked!gaheitman wrote:Right-clicking on the chart and choosing Refresh should fill in the gap if the data is available at the criminal.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
George
- gaheitman
- Trader
- Posts: 655
- Joined: Tue Nov 15, 2011 10:55 pm
- Location: Richmond, VA, US
Re: Script to (ATTEMPT) Force Download of historical data
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.cybernick wrote: Looks like I still have gaps in my data on the M1 time frame though...
George
-
- Trader
- Posts: 20
- Joined: Sat Jul 14, 2012 3:14 pm
Re: Script to (ATTEMPT) Force Download of historical data
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.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.
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.