Skip to content

WatchlistAddedEventArgs

class cAlgo.API

DesktopCLICloud

Occurs when a new watchlist is added.

Environment behaviour

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

Definition

public class WatchlistAddedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use WatchlistAddedEventArgs
    public partial class WatchlistAddedEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Watchlists.Added += OnWatchlistsAdded;
        }

        private void OnWatchlistsAdded(WatchlistAddedEventArgs obj)
        {
            Print("Watchlist {0} hase been added", obj.Watchlist.Name);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Watchlists.Added += self.on_watchlists_added

    def on_watchlists_added(self, args):
        print(f"Watchlist {args.Watchlist.Name} hase been added")
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
WatchlistDesktopCLICloudWatchlist Gets the watchlist.

See also