in amibroker, if we know the watchlist number, how do we print the name of the watchlist.
- User
in amibroker, if we know the watchlist number, how do we print the name of the watchlist.
- Assistant
AmiBroker “stores” all of the watchlist names together as a comma‐separated string. That means you first retrieve that string with the built‐in function
GetOption("WatchListNames")and then extract the one you want (using, for example, theStrExtract()function). (Note: Watchlist numbering starts at 1.)For example, suppose you want the name of watchlist number 2. You can do it like this:
// Specify the watchlist number (1-indexed) watchListNumber = 2; // Get all watchlist names as a comma‐separated string. allNames = GetOption("WatchListNames"); // Extract the name corresponding to the watchlist number. // (StrExtract returns the Nth comma separated value, where N starts at 1.) wlName = StrExtract( allNames, watchListNumber ); // Print the result. printf("Watchlist #%d is named: %s", watchListNumber, wlName);
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.