Skip to content

WatchlistAddedEventArgs

Summary

Occurs when a new watchlist is added.

Signature

1
public class WatchlistAddedEventArgs

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 using cAlgo.API;
 namespace cAlgo
 {
     // This sample shows how to use WatchlistAddedEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public 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)
         {
         }
     }
 }
1
2
3
4
5
6
7
8
 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")

See Also

Properties

Watchlist

Summary

Gets the watchlist.

Signature

1
public Watchlist Watchlist {get;}

Return Value

Watchlist