Exemple #1
0
        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));
        }
Exemple #2
0
 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();
 }
Exemple #3
0
 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();
 }