Esempio n. 1
0
 static public Exchange RelatedCashMarket(this NinjaTrader.Cbi.Instrument I)
 {
     if (I.FullName.Contains("ES "))
     {
         return(Exchange.Nyse);
     }
     if (I.FullName.Contains("FDAX "))
     {
         return(Exchange.Xetra);
     }
     return(I.Exchange);
 }
Esempio n. 2
0
 static public double MarketPriceLast(this NinjaTrader.Cbi.Instrument instrument)
 {
     if (instrument != null && instrument.HasSeenMarketData)
     {
         if (instrument.MarketData != null)
         {
             //Print(instrument.FullName+":" + instrument.MarketData.Last.Price.ToString());
             return(instrument.MarketData.Last.Price);
         }
     }
     return(0.0);
 }