Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Easiest way to organize variables largest to smallest

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

    Easiest way to organize variables largest to smallest

    I have 10 variables I need organized from largest to smallest. What the easiest way I could do it without writing each scenario?

    #2
    Hello Tmaninc,

    Thanks for your post.

    "Easiest" may be a matter of subjectivity.

    This is more of a C# question as there are no ninja script methods or properties that provide a sorting function.

    However, one C# .net approach would be to create a list, assign the variable values to an element in the list and use the List.Sort method which would resequence the list from lowest to highest.

    Non NinjaTrader Reference: https://www.dotnetperls.com/sort

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    58 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    34 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    196 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    362 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    281 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X