![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Certified NinjaScript Consultant
Join Date: Oct 2007
Location: Northern Illinois
Posts: 256
Thanks: 0
Thanked 3 times in 3 posts
|
Are there a functions I can call to determine:
1) The number of bars on the current chart 2) The max & min price on the current chart |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Unfortunately this is not supported.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
To get the number of bars in your bars object you can use this property:
Code:
CurrentBar To get max and min price of the current chart you will just have to roll your own algorithm. Store the value of a high and a low. If the next bar is higher then replace that high. etc etc.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Certified NinjaScript Consultant
Join Date: Oct 2007
Location: Northern Illinois
Posts: 256
Thanks: 0
Thanked 3 times in 3 posts
|
The CurrentBar gives a count of the total number of bars loaded (which could be 5 days worth of intraday bars). I'm looking for a way to determine how many bars are displayed in the current chart window. It would be helpful to know this so we can write text data to the screen at the leftmost bar of the window, at the topmost price of the window. Metatrader has a number of window functions (WindowBarsOnChart specifically, as well as WindowPriceMin and WindowPriceMax) that get us this info.
|
|
|
|
|
|
#5 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Unfortunately this is not supported.
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Range Bars | Doc | Suggestions And Feedback | 10 | 08-05-2011 01:14 PM |
| Range Bars? | momentom | Charting | 1 | 09-10-2007 08:18 AM |
| fixed range on chart - chart times | Laura47 | Charting | 13 | 07-10-2007 01:20 AM |
| Chart does not update when set to some Bars Back | Alfred | Charting | 3 | 06-13-2007 10:45 AM |
| Momentum bars or Price Range Bars | Akros | Indicator Development | 7 | 06-10-2007 04:55 AM |