WatchlistSymbolRemovedEventArgs
class cAlgo.API
DesktopCLICloud
Occurs when the symbol is removed from the watchlist.
Environment behaviour
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Watchlists.WatchlistSymbolRemoved).
Definition
public class WatchlistSymbolRemovedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
using cAlgo.API;
namespace cAlgo
{
// This sample shows how to use WatchlistSymbolRemovedEventArgs
public partial class WatchlistSymbolRemovedEventArgsSample : Indicator
{
protected override void Initialize()
{
Watchlists.WatchlistSymbolRemoved += OnWatchlistSymbolRemoved;
}
private void OnWatchlistSymbolRemoved(WatchlistSymbolRemovedEventArgs obj)
{
Print("Symbol {0} removed from watchlist {1}", obj.SymbolName, 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.WatchlistSymbolRemoved += self.on_watchlist_symbol_removed
def on_watchlist_symbol_removed(self, args):
print(f"Symbol {args.SymbolName} removed from watchlist {args.Watchlist.Name}")
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Properties
| Name | Description |
|---|---|
SymbolNameDesktopCLICloudstring | Gets the symbol name. |
WatchlistDesktopCLICloudWatchlist | Gets the watchlist. |