NinjaTrader Support Forum Highest bar from certain period

 06-02-2012, 02:58 AM #1 trail Junior Member   Join Date: Mar 2012 Posts: 13 Thanks: 2 Thanked 1 time in 1 post Highest bar from certain period Hi, This is my first post on this forum and I'm relatively new so this might be a stupid question.... I want to find the Highest bar in a certain period, say in the period from bar[5] to bar[20]. How can I get this value in the best way. Because standard I get the Highest bar from "bars ago" (from the newest bar [0]) and that is not what I want. Thanks in advance. Anne
06-02-2012, 06:57 AM   #2
koganam
Senior Member

Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,199
Thanks: 24
Thanked 1,225 times in 996 posts

Quote:
 Originally Posted by trail Hi, This is my first post on this forum and I'm relatively new so this might be a stupid question.... I want to find the Highest bar in a certain period, say in the period from bar[5] to bar[20]. How can I get this value in the best way. Because standard I get the Highest bar from "bars ago" (from the newest bar [0]) and that is not what I want. Thanks in advance. Anne
Use the MAX() class. ref: http://www.ninjatrader.com/support/h...aximum_max.htm

 The following 2 users say thank you to koganam for this post:
 06-04-2012, 09:45 AM #3 trail Junior Member   Join Date: Mar 2012 Posts: 13 Thanks: 2 Thanked 1 time in 1 post Thanks for your quick answer, koganam. I will try to work it out with the MAX class. Should I use a BarsArray in it? (To be clear: I don't need bars of another timeframe.) I hoped there would be a more simple way to do this. (For instance, just like in MS Excel when using formula's you can specify the place in a string.)
 06-04-2012, 01:33 PM #4 trail Junior Member   Join Date: Mar 2012 Posts: 13 Thanks: 2 Thanked 1 time in 1 post The MAX class was usefull. This gave me the right answer: MAX(High,15)[5]) Thanks again, Anne
 The following user says thank you to trail for this post:

 Tags frombar, highest, period, tobar

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News and Announcements     News and Announcements Application Technical Support     ATM Strategies (Discretionary Trading)     Automated Trading     Charting     Connecting     Installation and Licensing     Market Analyzer     Miscellaneous Support         Historical Version 7 Beta Threads             Critical Information - Please review             Version 7 Beta General Questions & Bug Reports         Historical NinjaTrader 6.5 Archive             Historical NinjaTrader 6.5 Beta Threads     Strategy Analyzer     SuperDOM and other Order Entry Windows NinjaScript Development Support     General Programming     Indicator Development     Strategy Development NinjaScript Educational Resources     Reference Samples     Tips NinjaScript File Sharing     NinjaScript File Sharing Discussion     Version 7 Indicators     Version 7 Strategies     Version 7 Miscellaneous Suggestions and Feedback     Suggestions And Feedback

 Similar Threads Thread Thread Starter Forum Replies Last Post Light General Programming 6 01-26-2010 01:28 PM Tobias1985 Strategy Development 4 02-26-2009 02:04 PM TAJTrades Indicator Development 7 08-26-2008 11:07 PM daven Indicator Development 2 09-28-2007 12:39 PM MrBaffalo Charting 16 03-08-2007 04:21 AM

All times are GMT -6. The time now is 10:58 PM.

 -- Fixed Width ---- Fluid Width NinjaTrader Support Forum - Archive - Top