public TradeStatusBar(TradeController controller, TradeService service) { this.controller = controller; this.service = service; controller.PropertyChanged += OnPropertyChanged; service.PropertyChanged += OnPropertyChanged; service.TickUpdated += OnTickUpdated; service.PositionUpdated += OnPositionUpdated; }
public TradeController() { service = new TradeService(Preferences.ClientId); menu = new TradeMenu(this); statusBar = new TradeStatusBar(this, service); PropertyChanged += OnPropertyChanged; service.PropertyChanged += OnPropertyChanged; service.Error += OnError; }
public static bool TickDataAvailable(TradeService service, params int[] tickTypes) { return(Validate( service.HasTicks(tickTypes), Messages.PriceDataUnavailableError)); }
public static bool TickerSet(TradeService service) { return(Validate( service.HasTickerSymbol, Messages.TickerSymbolNotSetError)); }