NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 07-16-2008, 09:53 AM   #1
nfeldberg
Member
 
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
Default Max/Min List

apologize if it is a stupid question but I am new to C#.

any help on this matter would be appreciated.

I am looking to the equivalent of MaxList/MinList in tradestasion.

Math.min and Math.max are good for only 2 numbers, I need something that will work with 4 different numbers.

thx
Nir
nfeldberg is offline  
Reply With Quote
Old 07-16-2008, 10:22 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

I believe you would need to do something like:

Math.Max(Math.Max(Math.Max(value1, value2), value3), value4)
NinjaTrader_Ray is offline  
Reply With Quote
Old 07-16-2008, 01:22 PM   #3
nfeldberg
Member
 
Join Date: Jul 2008
Posts: 67
Thanks: 0
Thanked 0 times in 0 posts
Default

thx will try it
nfeldberg is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
If NT crashes after importing symbol list, list is not saved Pete S Historical NinjaTrader 6.5 Beta Threads 4 03-16-2008 06:10 AM
Watch list? prostyle Miscellaneous Support 3 10-04-2007 10:29 AM
GUI wish list Oli Suggestions And Feedback 1 04-02-2007 05:20 AM
Wish List dandxg Miscellaneous Support 9 03-28-2007 03:51 AM
Wish list for NT craigsn Suggestions And Feedback 5 12-11-2004 02:33 AM


All times are GMT -6. The time now is 06:11 AM.