I have created a custom bar type. I would like to access this custom bar type's Open, High, Low, Close and Volume values. Can this be done? It should be doable as the values appear correctly in the Data Box. Can anyone suggest how this data can be retrieved via code? Any suggestions would be appreciated. Thank you.
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
Retrieve Custom Bar Type Information
Collapse
X
-
Retrieve Custom Bar Type Information
Hello,
I have created a custom bar type. I would like to access this custom bar type's Open, High, Low, Close and Volume values. Can this be done? It should be doable as the values appear correctly in the Data Box. Can anyone suggest how this data can be retrieved via code? Any suggestions would be appreciated. Thank you.Tags: None
-
Hello Zeos6,
Thanks for opening the thread.
A BarType is a property of a data series. Using a different BarType will modify the series and its associated OHLC values. If you add an indicator to a chart with a Custom BarType applied and that indicator prints OHLC values, the OHLC values of that BarType will be printed.
You would just have to access the associated PriceSeries as usual with the data series being one with a custom bartype. I.E. Open[0], High[0], Low[0], Close[0].
If you have any additional questions, please don't hesitate to ask.JimNinjaTrader Customer Service
-
Thanks for the reply Jim, but ...
I do not think you reply is correct. Have you tried it with the Heikin Ashi bar type? If you access the Open, High, ... as you suggested, you get the underlying bar Open, High, ... rather than the haOpen, haClose, ... I'd like to retrieve the haOpen, haClose... Is this possible?
EDIT:
You are correct Jim but here is the confusion on my part. I put up a simple indicator on the Heiken Ashi bar type chart. It simple prints current bar index and high, low, ... values. The issue seems to be with what is going on at the start of the data period. The bar indices behave strangely relative to time stamps. I have attached a pic.Last edited by Zeos6; 09-26-2017, 08:37 AM.
Comment
-
Hello Zeos6,
I created a similar indicator and a video discussing the data I am seeing.
Demo: https://www.screencast.com/t/0eubQYj8fu
If you have any further questions, please include an example we can look at together and I will be happy to provide further input.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by brunoviveiros, 02-17-2020, 05:31 AM
|
4 responses
63 views
0 likes
|
Last Post Today, 06:25 AM | ||
Started by volIQ, 03-27-2024, 04:28 PM
|
3 responses
21 views
0 likes
|
Last Post
by RJay
Today, 05:41 AM
|
||
Started by Nickgiaco, 02-26-2024, 10:23 AM
|
2 responses
72 views
0 likes
|
Last Post Today, 05:12 AM | ||
Started by Johndc, Today, 04:39 AM
|
0 responses
8 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
11 views
0 likes
|
Last Post Today, 02:34 AM |
Comment