Skip to content

TradeWatchTab.Detached

event · TradeWatchTab · cAlgo.API

DesktopCLICloud

Occurs when tab detached.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

event Action<TradeWatchTabDetachedEventArgs> Detached;
tradeWatchTab.Detached += handler  # handler(obj: TradeWatchTabDetachedEventArgs)

Examples

protected override void OnStart()
{
    var tab = TradeWatch.AddTab("My Tab");
    tab.Detached += OnTabDetached;
}

private void OnTabDetached(TradeWatchTabDetachedEventArgs args)
{
    Print("Tab {0} detached", args.TradeWatchTab.Title);
}
def on_start(self):
    tab = api.TradeWatch.AddTab("My Tab")
    tab.Detached += self.on_tab_detached

def on_tab_detached(self, args):
    api.Print(f"Tab {args.TradeWatchTab.Title} detached")