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 03-19-2009, 01:17 AM   #1
Winnie
Member
 
Join Date: Mar 2009
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default Maxlist function

Would anyone help me how to plot the max range(H-L) of the last 3 bar ? Is there any maxlist or minlist function ?
I try to use this but it does not work :
Max(Range(),3)

Thanks
Winnie is offline  
Reply With Quote
Old 03-19-2009, 02:31 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,409
Thanks: 252
Thanked 975 times in 958 posts
Default

Hi Winnie, please try this snippet-
Code:
double myRange = MAX(Range(), 3)[0];



NinjaTrader_Bertrand is online now  
Reply With Quote
Old 03-19-2009, 10:38 AM   #3
Winnie
Member
 
Join Date: Mar 2009
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
Default

it works well ! thanks
Winnie 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
MaxList Mindset General Programming 3 11-06-2008 10:31 AM
Use of Log function MicroAl General Programming 4 05-07-2008 12:50 PM
Use of the merge function ryker Miscellaneous Support 11 03-29-2008 02:21 PM
a function that does this HelloHello Automated Trading 1 09-13-2007 03:24 AM
playback function jc3 Suggestions And Feedback 4 04-06-2005 11:35 AM


All times are GMT -6. The time now is 05:55 AM.