Count Tickers in Watchlist.afl
上传用户:shiqiang
上传日期:2009-06-12
资源大小:1289k
文件大小:1k
源码类别:

金融证券系统

开发平台:

Others

  1. //------------------------------------------------------------------------------
  2. //
  3. //  Formula Name:    Count Tickers in Watchlist
  4. //  Author/Uploader: Anthony Faragasso 
  5. //  E-mail:          ajf1111@epix.net
  6. //  Date/Time Added: 2003-07-05 09:27:55
  7. //  Origin:          
  8. //  Keywords:        
  9. //  Level:           medium
  10. //  Flags:           showemail,function
  11. //  Formula URL:     http://www.amibroker.com/library/formula.php?id=290
  12. //  Details URL:     http://www.amibroker.com/library/detail.php?id=290
  13. //
  14. //------------------------------------------------------------------------------
  15. //
  16. //  This function will output the number of tickers in a selected watchlist
  17. //
  18. //------------------------------------------------------------------------------
  19. //Count tickers in watchlist function
  20. //Anthony Faragasso
  21. //July 4, 2003
  22. //Single watchlist output
  23. WatchlistNumber=0;//enter watchlist number
  24. function CountTickersInWatchList( Listnum )
  25. {
  26. // retrive comma-separated list of symbols in watch list
  27. list = GetCategorySymbols( categoryWatchlist, listnum );
  28. for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ )
  29. {
  30. if( i == 0 ) i = 0;
  31. else i = i ;
  32. }
  33. return i; 
  34. }
  35. Filter=1;
  36. AddColumn(CountTickersInWatchList( WatchlistNumber),"Watchlist #"+WriteVal(watchlistnumber,1),1);