Skip to content

TradeWatchTabAttachedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for plugin trade watch tab attached event.

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

public class TradeWatchTabAttachedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

protected override void OnStart()
{
    var tab = TradeWatch.AddTab("My Tab");
    tab.Child = new TextBlock { Text = "Hello from plugin" };
    tab.Attached += OnTradeWatchTabAttached;
}

private void OnTradeWatchTabAttached(TradeWatchTabAttachedEventArgs args)
{
    Print("Tab {0} attached back to the trade watch", args.TradeWatchTab.Title);
}
def on_start(self):
    tab = api.TradeWatch.AddTab("My Tab")
    text_block = TextBlock()
    text_block.Text = "Hello from plugin"
    tab.Child = text_block
    tab.Attached += self.on_trade_watch_tab_attached

def on_trade_watch_tab_attached(self, args):
    api.Print(f"Tab {args.TradeWatchTab.Title} attached back to the trade watch")

Properties

Name Description
TradeWatchTabDesktopCLICloudTradeWatchTab Attached tab.

See also