![]() |
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 |
|
Senior Member
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
|
Hi, how can I determine the price at the top of the chart or bottom of the chart? I mean not the data... simply if chart displays 100.15 to 100.40 then how do I get this 100.40 (or close to it) value? ... and also the 100.15 value?
|
|
|
|
|
|
#2 |
|
NinjaScript Certified Consultant
Join Date: May 2008
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
If I understand you correctly, you want to know the approximate high and low of recent price actions. Depending on your timeframe, it may suffice to call CurrentDayOHL method to find the high and low of the current day. If you want to know specifically the high of the last, say, 30, bars, you can create a private variable of the DataSeries type initially. When the OnBarUpdate method is called, pouplate it with highs of the last 30 bars and use the Max function to find the high for the last 30 bars. With a similar approach, you can find the low.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
|
thanks but no, well yes,,
it is price action... the high and low of the chart window... all I want to know is what is the price of the top of the chart and the price of the bottom. Or if that is not possible, then how do I determine how many bars the chart window is showing? If I know that then I can figure out the top of the chart and the bottom by getting the high and low of the last x bars where x is the number of bars visible in the chart window. |
|
|
|
|
|
#4 |
|
NinjaScript Certified Consultant
Join Date: May 2008
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
I see what you want now. First, I want to correct myself on how to find the highest high of the recent n bars. The method to use is HighestBar. Second, I am curious why an indicator even cares about how many bars are visible in the chart. I would think the market (and therefore your indicador) does not care how you resize or scroll your chart.
However, if you want to find it out to ensure your indicator's plots are visible in the chart, you can set its AutoScale property to true.
|
|
|
|
|
|
#5 | |
|
Member
Join Date: Feb 2008
Posts: 47
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
Check the CalculateValueAreaHisto indicator. |
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
|
thanks for the help guys
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error message on log-off, can't read | chartlearner | Connecting | 1 | 05-09-2008 04:55 AM |
| DrawText() improvement request - anchoring at the bottom | Wizard | General Programming | 5 | 04-19-2008 09:36 PM |
| Volume Bar on Top/Bottom of Price Candle? | shortorlong | Indicator Development | 0 | 03-25-2008 12:20 AM |
| chart get compressed down at bottom | nkhoi | Miscellaneous Support | 2 | 01-28-2008 06:07 AM |
| NT didn't read the OIF | trader25 | Automated Trading | 7 | 05-11-2005 02:07 PM |