I know how to create a watchlist based on another watchlist and also I know how to create text files from a watchlist but I don't know (not much programming experience) how to update a watchlist with symbols available in text files on the hard drive (for example in C:\data there are files like aapl.txt, amzn.txt, nflx.txt, etc.) but the files may change daily and I want the watchlist updated based on new ones only.)
Any help will be appreciated. I search this forum and I could not find the answer. Maybe I missed it.
I tried a few different things but did not work. I need to important text files from hard drive to a watchlist after cleaning it. The text files have the symbol name and extension .txt, e.g. AAPL.txt
I need to do this daily because the files on hard drive change. Thanks in advance.
Note that watch lists files (those inside "Watchlists" subfolder) are read ONCE when you open database and saved ONCE when you close the database (or exit program). During all time in between they are kept in RAM.
Is your "CategoryAddSymbol" grabbing the extension (.txt or .csv) of the file as well? Should it just be the symbol?
Also, would you need to shut down and restart AmiBroker to recognize the changes you made in the Watchlist?
But now I have a more serious problem. In the watchlist I import from hard drive the symbols have no dividend adjustments, i.e., I need the data without dividend adjustment and only splits where it applies.
But since those same symbols already exist in the database as dividend adjusted, the new watchlist reverts back to them.
I tried to import the file to the watchlist with a modified name but it did not work. Probably they must be added to database first but I cannot find a way or function that does that.