QUOTE:
But honestly, it would be optimal to rewrite such kind of script from scratch in C# rather than trying to translate it.
Thats exactly why I did not want to use the Translator tool. I thought this would result in a total mess ;-).
The way I was using it was for survivorship bias. The funcion returns true if a symbol was in the list on a given bar.
The structure of the files is following:
One file is a library of all the available files that contain the symbols that are active from this file to the next file. The individual files have the naming convention xxxx_yyyymmdd.txt.
Lets assume you have these files:
DAX_20010702.txt
DAX_20010910.txt
DAX_20020923.txt
Each of those files holds a list of symbols that were in the index at this date. The list is one smybol at each line. The assumption is, that each symbol in the list is
active or
onWatch (how it is named in the v3 code) until the next file. If it still appears it was still in the index, if not it was dropped.
Additionally there is one file I named "Bestandsliste.txt", which is a library of all single files. So in this example "Bestandsliste.txt" holds in every line the names of the files
DAX_20010702.txt
DAX_20010910.txt
DAX_20020923.txt.
One can use this function for index components or any othere operation where one creates a watchlist that is replaced from time to time.