Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
 public void Subscribe(IPriceFeedService priceFeedService)
 {
     priceFeedService.Subscribe(_SignalTimeframe, MarketOrderPriceAction)
     .Register(_probe1)
     .Register(_probe2);
 }
Пример #4
0
 public abstract void Subscribe(IPriceFeedService priceFeedService);
Пример #5
0
 public void Subscribe(IPriceFeedService priceFeedService)
 {
     priceFeedService.Subscribe(_ticker, PriceAction);
 }