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 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 05-18-2008, 05:40 PM   #1
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
Default how to read top or bottom of chart?

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?
NinjaCustomer is offline  
Reply With Quote
Old 05-18-2008, 08:22 PM   #2
KamaCoder Eric
NinjaScript Certified Consultant
 
Join Date: May 2008
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Default

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.
KamaCoder Eric is offline  
Reply With Quote
Old 05-18-2008, 08:26 PM   #3
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
Default

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.
NinjaCustomer is offline  
Reply With Quote
Old 05-18-2008, 09:58 PM   #4
KamaCoder Eric
NinjaScript Certified Consultant
 
Join Date: May 2008
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Default

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.
KamaCoder Eric is offline  
Reply With Quote
Old 05-18-2008, 10:17 PM   #5
mason
Member
 
Join Date: Feb 2008
Posts: 47
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaCustomer View Post
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?

Check the CalculateValueAreaHisto indicator.
mason is offline  
Reply With Quote
Old 05-18-2008, 10:20 PM   #6
NinjaCustomer
Senior Member
 
Join Date: Jan 2008
Posts: 130
Thanks: 0
Thanked 0 times in 0 posts
Default

thanks for the help guys
NinjaCustomer 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
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


All times are GMT -6. The time now is 09:43 AM.