![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
|
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? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
This would depend on how you've set the CalculateOnBarClose, with the default settting ('true') it would consider the previous 9 bars.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
|
Thanks Bertrand. How can I get it to consider the current bar as well?
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Just run the indicator on CalculateOnBarClose = false, this will update the calcs on each incoming tick.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Sep 2009
Posts: 562
Thanks: 40
Thanked 4 times in 4 posts
|
Thanks again Bertrand!
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |