I made a formula to put in a file a list of symbols (some blenk and other appending ",*".
-------------------------------------------------------
WatchListNo = Param("WatchListNo", 0, 0, 63, 1);
fh = fopen( "D:\\Resource\\a\\myfile.txt", "w");
list = CategoryGetSymbols( categoryWatchlist, 50 );
list2 = CategoryGetSymbols( categoryWatchlist, 51 );
for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )
{
fputs( symbol + "" + "\n", fh );
}
for( i = 0; ( symbol = StrExtract( list2, i ) ) != ""; i++ )
{
fputs( symbol + ",*" + "\n", fh );
}
fclose( fh );
-------------------------------------------------------
Example, now (with the formula above) the list in a file appaer:
AAPL
MSFT
AQN
ARC
ORCL,*
INTC,*
...
Question:
If I want to add a prerfix (linked At the name of GROUP plus ":")
the list sholud be:
NASDAQ:AAPL
NASDAQ:MSFT
NYSE:AQN
NYSE:ARC
NASDAQ:ORCL,*
NASDAQ:INTC,*
....
Can anyone help me to modify the formula (above)
Thanks in advance
Kiss
-------------------------------------------------------
WatchListNo = Param("WatchListNo", 0, 0, 63, 1);
fh = fopen( "D:\\Resource\\a\\myfile.txt", "w");
list = CategoryGetSymbols( categoryWatchlist, 50 );
list2 = CategoryGetSymbols( categoryWatchlist, 51 );
for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )
{
fputs( symbol + "" + "\n", fh );
}
for( i = 0; ( symbol = StrExtract( list2, i ) ) != ""; i++ )
{
fputs( symbol + ",*" + "\n", fh );
}
fclose( fh );
-------------------------------------------------------
Example, now (with the formula above) the list in a file appaer:
AAPL
MSFT
AQN
ARC
ORCL,*
INTC,*
...
Question:
If I want to add a prerfix (linked At the name of GROUP plus ":")
the list sholud be:
NASDAQ:AAPL
NASDAQ:MSFT
NYSE:AQN
NYSE:ARC
NASDAQ:ORCL,*
NASDAQ:INTC,*
....
Can anyone help me to modify the formula (above)
Thanks in advance
Kiss