public static bool TrySubscribe(TickerReference ticker, IPriceFeedService priceFeedService, Action <TickerReference, ICandlestickBar> priceBarAction) { if (ticker.PriceFeedType == typeof(CandlestickPriceOption) && ((CandlestickPriceOption)ticker.PriceFeedOption) == CandlestickPriceOption.All) { priceFeedService.Subscribe(ticker, priceBarAction); return(true); } else { return(false); } }
public static bool TrySubscribe(TickerReference ticker, IPriceFeedService priceFeedService, Action <TickerReference, long, PriceBarOption, double> priceOptionAction) { if (ticker.PriceFeedType == typeof(PriceBarOption)) { priceFeedService.Subscribe(ticker, (PriceBarOption)ticker.PriceFeedOption, priceOptionAction); return(true); } else { return(false); } }
public void Subscribe(IPriceFeedService priceFeedService) { priceFeedService.Subscribe(_SignalTimeframe, MarketOrderPriceAction) .Register(_probe1) .Register(_probe2); }
public abstract void Subscribe(IPriceFeedService priceFeedService);
public void Subscribe(IPriceFeedService priceFeedService) { priceFeedService.Subscribe(_ticker, PriceAction); }