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 02-11-2009, 12:22 PM   #1
binwang2
Senior Member
 
Join Date: Jan 2009
Posts: 216
Thanks: 0
Thanked 1 time in 1 post
Default On using MAX

The help guide on using MAX is the following:
MAX(IDataSeries inputData, int period)[int barsAgo]

My question is on the [int barsAgo] if barsAgo is not 0. I use barsAgo =15 as an example;

MAX(High, 40)[15],
i should get the highest high for the bars between 54 and 15, NOT highest high for most recent 40 bars. In other wors, the period is started at barsAgo and is counted further into the past by 'period' amount.
Is this understaning correct?
binwang2 is offline  
Reply With Quote
Old 02-11-2009, 12:27 PM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,381
Thanks: 252
Thanked 966 times in 949 posts
Default

You got it binwang2.
NinjaTrader_Bertrand is online now  
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
MAX Function snaphook General Programming 4 02-04-2009 05:56 AM
Max nigeleyre Strategy Development 1 01-05-2009 01:24 PM
Using MAX with Crossover zeller4 Indicator Development 1 11-20-2008 09:40 AM
Max/Min List nfeldberg General Programming 2 07-16-2008 01:22 PM
Min / Max mydet Indicator Development 1 05-31-2007 04:47 AM


All times are GMT -6. The time now is 07:45 AM.