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
Bars on chart or price range on chart
Collapse
X
-
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.
Leave a comment:
-
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.
Leave a comment:
-
Bars on chart or price range on chart
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 chartTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
4 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
||
Started by gleichnerany, Today, 01:17 AM
|
0 responses
5 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
||
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
47 views
0 likes
|
Last Post Today, 12:28 AM |
Leave a comment: