Skip to content

TradeWatchTab.Attached

event · TradeWatchTab · cAlgo.API

DesktopCLICloud

Occurs when tab attached.

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<TradeWatchTabAttachedEventArgs> Attached;
tradeWatchTab.Attached += handler  # handler(obj: TradeWatchTabAttachedEventArgs)

Examples

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

private void OnTabAttached(TradeWatchTabAttachedEventArgs args)
{
    Print("Tab {0} attached", args.TradeWatchTab.Title);
}
def on_start(self):
    tab = api.TradeWatch.AddTab("My Tab")
    tab.Attached += self.on_tab_attached

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