• 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 yikccv, Today, 08:49 PM
      0 responses
      2 views
      0 likes
      Last Post yikccv
      by yikccv
       
      Started by supernova0219, Today, 07:48 PM
      0 responses
      5 views
      0 likes
      Last Post supernova0219  
      Started by qwfxny, Today, 07:20 PM
      0 responses
      3 views
      0 likes
      Last Post qwfxny
      by qwfxny
       
      Started by bouncetherubble, Today, 04:48 PM
      0 responses
      3 views
      0 likes
      Last Post bouncetherubble  
      Started by johnnybegoode, Today, 11:35 AM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X