Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
how to read top or bottom of chart?
Collapse
X
-
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?Tags: None
-
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.
-
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.
Comment
-
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.
Comment
-
Originally posted by NinjaCustomer View PostHi, 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.
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Brevo, Today, 01:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
242 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
9 responses
384 views
1 like
|
Last Post
by Gavini
Today, 12:29 AM
|
||
Started by oviejo, Today, 12:28 AM
|
0 responses
6 views
0 likes
|
Last Post
by oviejo
Today, 12:28 AM
|
Comment