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-17-2010, 11:16 PM   #1
kaywai
Senior Member
 
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
Default HighestBar()

Hi,

The syntax for HighestBar() is:-

HighestBar(IDataSeries series, int lookBackPeriod)

If I have a lookbackperiod of 9, will it consider the currentbar + the previous 9 bars or just the previous 9 bars?
kaywai is offline  
Reply With Quote
Old 02-18-2010, 05:45 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
Default

This would depend on how you've set the CalculateOnBarClose, with the default settting ('true') it would consider the previous 9 bars.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-18-2010, 07:03 AM   #3
kaywai
Senior Member
 
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
Default

Thanks Bertrand. How can I get it to consider the current bar as well?
kaywai is offline  
Reply With Quote
Old 02-18-2010, 07:09 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
Default

Just run the indicator on CalculateOnBarClose = false, this will update the calcs on each incoming tick.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-18-2010, 07:11 AM   #5
kaywai
Senior Member
 
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
Default

Thanks again Bertrand!
kaywai 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
NinjaScript LowestBar & HighestBar Documentation KBJ General Programming 3 06-11-2012 03:02 PM
HighestBar only return abr [0] ct Indicator Development 11 06-10-2010 09:22 PM
LowestBar / HighestBar not giving Low and high ?? scottyboy General Programming 15 01-20-2009 02:13 PM
HighestBar and LowestBar Sidhartha General Programming 14 04-07-2008 01:22 PM
How do you find the HighestBar() not including the current bar? OnePutt General Programming 1 12-23-2007 10:35 AM


All times are GMT -6. The time now is 12:53 PM.