Esempio n. 1
0
 /// <summary>
 /// Quik interface in .NET constructor
 /// </summary>
 public Quik(int port = DefaultPort, IPersistentStorage storage = null)
 {
     if (storage == null)
     {
         Storage = new InMemoryStorage();
     }
     else
     {
         Storage = storage;
     }
     QuikService = QuikService.Create(port);
     // poor man's DI
     QuikService.Storage = Storage;
     Events                    = QuikService.Events;
     Debug                     = new DebugFunctions(port);
     Service                   = new ServiceFunctions(port);
     Class                     = new ClassFunctions(port);
     OrderBook                 = new OrderBookFunctions(port);
     Trading                   = new TradingFunctions(port);
     StopOrders                = new StopOrderFunctions(port, this);
     Orders                    = new OrderFunctions(port, this);
     Candles                   = new CandleFunctions(port);
     QuikService.Candles       = Candles;
     QuikService.StopOrders    = StopOrders;
     QuikService.WorkingFolder = Service.GetWorkingFolder().Result;
 }
Esempio n. 2
0
 /// <summary>
 /// Quik interface in .NET constructor
 /// </summary>
 public Quik(int port = DefaultPort, IPersistentStorage storage = null) {
     if (storage == null) { Storage = new EsentStorage(); } else { Storage = storage; }
     QuikService = QuikService.Create(port);
     // poor man's DI
     QuikService.Storage = Storage;
     Events = QuikService.Events;
     Debug = new DebugFunctions(port);
     Service = new ServiceFunctions(port);
     Class = new ClassFunctions(port);
     OrderBook = new OrderBookFunctions(port);
     Trading = new TradingFunctions(port);
     StopOrders = new StopOrderFunctions(port, this);
     Orders = new OrderFunctions(port, this);
     Candles = new CandleFunctions(port);
     QuikService.Candles = Candles;
     QuikService.StopOrders = StopOrders;
 }
Esempio n. 3
0
 /// <summary>
 /// Quik interface in .NET constructor
 /// </summary>
 public Quik(int port = DefaultPort, IPersistentStorage storage = null)
 {
     if (storage == null)
     {
         Storage = new EsentStorage();
     }
     else
     {
         Storage = storage;
     }
     QuikService = QuikService.Create(port);
     // poor man's DI
     QuikService.Storage = Storage;
     Events    = QuikService.Events;
     Debug     = new DebugFunctions(port);
     Service   = new ServiceFunctions(port);
     Class     = new ClassFunctions(port);
     OrderBook = new OrderBookFunctions(port);
     Trading   = new TradingFunctions(port);
 }
Esempio n. 4
0
 /// <summary>
 /// Quik interface in .NET constructor
 /// </summary>
 public Quik(int port = DefaultPort, IPersistentStorage storage = null, string host = DefaultHost)
 {
     Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
     Storage     = storage == null ? new InMemoryStorage() : storage;
     QuikService = QuikService.Create(port, host);
     // poor man's DI
     QuikService.Storage = Storage;
     Events                    = QuikService.Events;
     Debug                     = new DebugFunctions(port, host);
     Service                   = new ServiceFunctions(port, host);
     Class                     = new ClassFunctions(port, host);
     OrderBook                 = new OrderBookFunctions(port, host);
     Trading                   = new TradingFunctions(port, host);
     StopOrders                = new StopOrderFunctions(port, this, host);
     Orders                    = new OrderFunctions(port, this, host);
     Candles                   = new CandleFunctions(port, host);
     QuikService.Candles       = Candles;
     QuikService.StopOrders    = StopOrders;
     QuikService.WorkingFolder = Service.GetWorkingFolder().Result;
 }