How to deal with bad data
Author: bgood
Creation Date: 12/8/2008 3:15 PM
profile picture

bgood

#1
Hello,

Sorry for asking a trival question, but I have several downloads with bad data in them. I have brought up the charts with the bad data, right-clicked, and clicked on "Reload Chart History". The data has been downloaded again, and is still wrong. I am unsure how to get rid of the bad data now. It would be very helpful if there was a way that I could edit/hand-correct the individual data entries, but I can not find anything else to try. What would you suggest?
profile picture

Eugene

#2
Hello Bryce,

Version 5.3 (which we believe is to be released in the beginning of 2009) will make it possible to edit data like we used to do in WL4.

Currently I can think of two possible ways:

1) On-the-fly, without altering the data. See WealthScript Guide:
1.1. The Bars Object > OHLC/V Series > "How to: Change OHLC/V Series Values"
1.2. DataSeries > Filling a Custom DataSeries > "How to: Change the value of items in a DataSeries"

2) Apply your correction to data in the Strategy, just like in p.1, and subsequently call the Bars.SaveToFile method to produce a native *.WL file. The only thing that's left is to overwrite the old file with the new one (where: see Wealth-Lab User Guide > Data > Where Data is Stored).

Although the method will be documented in QuickRef as of v5.3, it's already available in 5.1 so I'm pasting the description for your convenience:

QUOTE:

SaveToFile
void SaveToFile(string fileName)

Saves the Bars object to a file on disk. The binary file can be recognized by Wealth-Lab natively (see LoadFromFile).


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

bgood

#3
Hello Eugene,

I will need to play with this tonight, but it sounds reasonable. It sounds like 5.3 will be a great upgrade when it is available. Thank you for the help.

Bryce
profile picture

Eugene

#4
Bryce

There's another way to skin a cat, so I feel almost guilty for not pointing you to the WL5 Wiki FAQ :)

Is it possible to edit stored data in Wealth-Lab 5?