Skip to content

WatchlistAddedEventArgs.Watchlist

property · WatchlistAddedEventArgs · cAlgo.API

DesktopCLICloud

Gets the watchlist.

Environment behaviour

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Watchlists.Added).

Definition

public Watchlist Watchlist {get;}
watchlistAddedEventArgs.Watchlist: Watchlist

Returns Watchlist

Examples

protected override void OnStart()
{
    Watchlists.Added += OnWatchlistsAdded;
}

private void OnWatchlistsAdded(WatchlistAddedEventArgs args)
{
    Print("Watchlist {0} added with {1} symbols", args.Watchlist.Name, args.Watchlist.SymbolNames.Count);
}
def on_start(self):
    api.Watchlists.Added += self.on_watchlists_added

def on_watchlists_added(self, args):
    api.Print(f"Watchlist {args.Watchlist.Name} added with {args.Watchlist.SymbolNames.Count} symbols")