Skip to main content

TopGainers

TopGainers provides a list of (valid at the moment) top performers. Data is compiled by the data provider of your choice. If the feature is not supported by your data provider an empty list will be returned.

TopGainers.update#

Refreshes the list of the current top performers. eshes the list of the current top performers.

• parameters

NONE

• return value:

NONE

TopGainers.all#

Returns a list of the most recently updated top gainers. The list should be refreshed with a call to TopGainers.update(), otherwise it may be outdated. If the top gainers/loosers feature is not supported by your data provider, an empty list will be returned.

• parameters

NONE

• return value:

ResultReturn value
on successiterable list symbols of top gainers
on erroran empty list
TopGainers.update();
var list = TopGainers.all();
list.forEach(function(gainer){
if (gainer.currentPrice < 10.0) {
Positions.add(gainer.symbol);
}
});