• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error using List.Min

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error using List.Min

    Hi,

    I have a custom list which contains IOrders, and some other items, I am using the Min method of Lists to find the order whos offer price is the lowest, like this,

    Code:
    var minOffer = offerOrderBook.Min(o => o.Order.LimitPrice);
    this compliles fine but when I try to expose the limit price of the IOrder I get an error. This is how I am trying to get the limit price:-

    Code:
    double f = minOffer.Order.LimitPrice;
    and the error I get is:-

    'double' does not contain a definition for 'Order' and no extension method 'Order' accepting a first argument of type 'double' could be found (are you missing a using directive or an assembly reference?)

    #2
    OK found the problem : )

    The first query actually returns the double I am looking for not the Custom Item. So I am all set.

    Problem solved.

    Comment


      #3
      Hello GKonheiser,

      I am glad you were able to find the solution.

      Thank you for posting your solution.
      Patrick H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by trader252, Today, 08:38 PM
      0 responses
      2 views
      0 likes
      Last Post trader252  
      Started by ralett, Today, 06:20 PM
      0 responses
      4 views
      0 likes
      Last Post ralett
      by ralett
       
      Started by grizzlytrader, Today, 06:24 AM
      1 response
      20 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by andrewtrades, Today, 01:43 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by FuturesRon, Today, 03:09 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X