public int MarketInfo(string symbol, MarketInfoType type) { AsyncCommand cmd = new AsyncCommand(Commands.MarketInfo, new object[] { symbol, type }); ExecuteCommand(cmd); if (type == MarketInfoType.MODE_EXPIRATION || type == MarketInfoType.MODE_TIME) { return((int)(double)cmd.Result); } return(Convertor.TranslateToPipPrice(symbol, (double)cmd.Result)); }
public int MarketInfo(string symbol, MarketInfoType type) { if (type == MarketInfoType.MODE_ASK) { return(this.currentTick.Tick.Ask); } if (type == MarketInfoType.MODE_BID) { return(this.currentTick.Tick.Bid); } throw new NotImplementedException(); }
public int MarketInfo(string symbol, MarketInfoType type) { if (type == MarketInfoType.MODE_ASK) { return(this.currentTick.Tick.Ask); } if (type == MarketInfoType.MODE_BID) { return(this.currentTick.Tick.Bid); } if (type == MarketInfoType.MODE_TIME) { return(FxAdvisorCore.Convertor.DateTimeToSeconds(this.currentTick.Tick.DateTime)); } throw new NotImplementedException(); }