Certain Time Frames are not Being Reached Ever Since using the Export to CSV Function

 
Hi 

Yesterday I tried to export data directly into a CSV file using some code for write to file etc.   Just when I started the strategy tester, the computer became very noticeably slow (including the little spinning circle).  It took much longer to actually display alerts in the journal and so on.  However, after this was done, I reverted back to using ordinary alerts with my normal EA's, but not even this took very long to start.  So I have a feeling that export to CSV is after corrupting the computer or MT4 in some way.  However, I have reinstalled MT4 and even tried it on a different broker, so it's hard to tell what the issue really is.  



The main problem it's causing is, the 1 Minute data is not being reached (only when I am using a higher time frame).  But if I use the 1 minute data on its own, then it's fine.  On top of that, if I use the higher timeframe EA's close to todays date, then the 1 minute can be reached (keep in mind the 1 minute on its own manages to go back many years).  Every time I change the data the specific date this happens is different.   For example, it was starting to process at 26/09/2019, and sometimes depending on the higher time frame, it can be even later before it becomes reachable.  


I'm receiving error code 4074 when I use GetLastError().  
I'm not 100% sure, but I think that's telling me my computers memory can't handle it.  That strengthens my belief that the intensive file writing test I done wreaked havoc on my memory in some way (I don't know much about computers or how memory can be affected long term).   I imagine it damaged MT4 or some pathways for any terminal because it's happening on all of them.  

I have restarted the laptop and still nothing.  I am using Tickstory for the data, and looking for help on that forum too, however, I have tried the usual fixes, deleted, re-downloaded, logged out, entered wrong password to stay logged out etc... 

I noticed that in the History Center the 1 Minute section was indeed stopping at 26/09/2019, however, on other MT4's I don't even have data displayed in the history center and it works in some cases, but of course, never to the point where the above problems are solved.  

My EA's are reasonably large (in the sense that they have slots for storing parts of arrays), a total of 50 slots, but never are even 10 or more used.  I have also deleted 49 to have only one slot, just to check, but it made no difference.  The figures also get reset to 0 once the loop finishes, which prevents questions being asked infinitely.  

However, I have been using these EA's for weeks in this way, and it never made the computer very slow (certainly never to an annoying extent).  

As mentioned I don't know much about computers, so another question I have is, could there be some kind of overload of permanently stored memory built up because of the export I tried yesterday, or perhaps from the weeks of using these backtest EA's?

I also have 80 GB of space left of a 475 GB hard drive, I imagine that's ok.  

I'm considering storing all of my EA's and anything else somewhere safe, then deleting everything related to MT4, then reinstalling freshly, not sure, but I said I'd ask here to see if that would be expected to make a difference.  

I am 99.9% sure it's not anything to do with the EA's, because I done absolutely nothing to change the things that are not working, and just to be sure I checked EA's that I didn't change recently.  Not sure what else I can add here other than the frustration it's causing :D

Any help much appreciated
Reason: