Checking data for out of sequence Dates
Author: Panache
Creation Date: 5/21/2010 2:14 PM
profile picture

Panache

#1
I was having all kinds of issues with my scripts throwing errors, so I wrote this little script to check for out of sequence dates. If you run it against a Data Set, it prints a list of the symbols with bad bars in the Debug window. If you run it against a single symbol, it will also highlight the bad bar on the Chart.

I was amazed how many of my symbols had out of sequence dates. In most cases, the problem was an extra bar that had been inserted. This can easily be fixed by right clicking on the bar and clicking Edit Bar Data>Remove.

It is a good idea to rerun the script after you fix the bar to make sure there aren't multiple problems with the data. (Don't forget to manually clear the Debug window before you rerun it.)

CODE:
Please log in to see this code.
profile picture

Eugene

#2
Also, check out the "Bad History Data Check" strategy in Utilities folder.
profile picture

Panache

#3
After analyzing the errors more carefully and comparing my data to my backed up data, many of the out of sequence bars are NOT extra bars, but are bars which once were in the correct order, but which are now out of sequence. I don't have any way of knowing how this happened, but I would caution everyone to back up their Wealth-Lab data often, just like you would any other data. That way, you won't have to manually fix the data if it become corrupted!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).