TradeWatchSizeChangedEventArgs.TradeWatch
property · TradeWatchSizeChangedEventArgs · cAlgo.API
DesktopCLICloud
Trade watch.
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 TradeWatch TradeWatch {get;}
tradeWatchSizeChangedEventArgs.TradeWatch: TradeWatch
Returns TradeWatch
Examples
protected override void OnStart()
{
TradeWatch.SizeChanged += OnTradeWatchSizeChanged;
}
private void OnTradeWatchSizeChanged(TradeWatchSizeChangedEventArgs args)
{
if (args.TradeWatch.Height < 150)
Print("Trade watch is too small to show details: {0}", args.TradeWatch.Height);
}
def on_start(self):
api.TradeWatch.SizeChanged += self.on_trade_watch_size_changed
def on_trade_watch_size_changed(self, args):
if args.TradeWatch.Height < 150:
api.Print(f"Trade watch is too small to show details: {args.TradeWatch.Height}")