//private List<TradeSymbolRawCsvRecord> m_tradeSymbols; //private List<TradeSymbolRawCsvRecord> m_activeTradeSymbols; public TraderFX() { m_api = new ExchangeSharpApi(ExchangeSet.All); m_api.LoadCredentials(Credentials.CredentialsFile, Credentials.CredentialsPassword); m_creds = Credentials.LoadEncryptedCsv(Credentials.CredentialsFile, Credentials.CredentialsPassword); m_prowl = new ProwlPub(m_creds["PROWL"].Key, "Scalper"); m_om = new OrderManager(m_creds); //m_maker = new CandlestickMaker(); //m_orders = new ConcurrentBag<ExchangeOrderResult>(); m_priceFeed = PriceFeed.Instance; }
static void Main(string[] args) { m_prices = PriceFeed.Instance; m_prices.UpdatePrices += M_prices_UpdatePrices; /*m_history = HistoryFeed.Instance; * m_history.GetDailyTimeframe("@VXH18", "20160101", "20181231", "20000", "1", "PYQFEED", "5000"); * return;*/ //SubscribeNikkeiYen("H18"); //SubscribeCopper("H18"); SubscribeVIXES("H18"); Console.WriteLine("(displaying price updates while thread sleeping...)"); Thread.Sleep(60000); }
public CryptoTradeForm() { InitializeComponent(); // Wire up events Crypto.UpdateOrdersEvent += Crypto_UpdateOrdersEvent; Crypto.UpdateTickerEvent += Crypto_UpdateTickerEvent; // Create Bid/Ask displays for @BTC and @XBT futures m_baBtc = new TextBidAsk(panelBtc, "@BTC:"); m_baXbt = new TextBidAsk(panelXbt, "@XBT:"); Crypto.InitializeExchanges(); LoadAlgos(); LoadStudies(); m_orderGridPanel = new TickerGridPanel(panelCrypto2, "Orders", Color.Gray, ZOrder.Columns); m_orderGridPanel.Initialize(); m_orderGridPanel.Grid.CellClick += OrderGrid_CellClick; m_gridPanels.Add(m_orderGridPanel); m_tradeGridPanel = new TickerGridPanel(panelCrypto3, "Trades", Color.Gray, ZTrade.Columns); m_tradeGridPanel.Initialize(); m_gridPanels.Add(m_tradeGridPanel); m_iq = PriceFeed.Instance; m_iq.UpdatePrices += M_iq_UpdatePrices; m_iq.SubscribePrices("@BTC#"); m_iq.SubscribePrices("@XBT#"); m_iq.SubscribePrices("XBTX.XO"); m_iq.SubscribePrices("BRTI.X"); m_iq.SubscribePrices("GXBT.XO"); Initialize(); m_updateTickerCount = 0; Task.Run(() => UpdateExchangeTickers()); Task.Run(() => UpdateBalances()); Task.Run(() => UpdateOrders()); }