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
Adding series to custom BarsType
Collapse
X
-
Hello Jesse,
I poked around a little and found that a chart's OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars) chartBars parameter has a chartBars.Bars.BarsType that references the custom BarsType. When you cast that to the custom BarsType you can access public members.
Regards,
Adi
-
Hello,
Thank you for the post.
I am unsure of any way this concept could work, there are no documented or suggested ways to expose anything from a BarsType to a ChartStyle or any other type.
A BarsType by nature is simply for calculating bars for a series, the other tools like a chart makes use of this process to build the bars you see. A chart uses this request in combination with other types like the ChartStyle to display the bars.
I believe the help guide note is targeted more specifically at types that reside on a chart like Indicators or Strategies as the series is populated with the number of Bars on the chart. This is more of a system to parallel the existing price data series but to be custom for any type.
I look forward to being of further assistance.
Leave a comment:
-
Adding series to custom BarsType
Hello,
Is there a way to add a series of my own type in a custom BarsType that would then also be accessible to a custom ChartStyle (in addition to the Bars object).
If I understand correctly the documentation (quoted below) refers to Indicators and not BarsType.
Thanks you,
Adi
Series<T> Objects
Series<T> is the base class for PriceSeries, TimeSeries, and VolumeSeries. Rather than using one of these pre-defined derived classes, you can create your own Series<T> collection to hold any Type that you choose. The advantage that Series<T> has over other collections is that it can be quickly initialized to contain a number of index slots equal to the number of bars in one of the Bars objects on the chart, with each index slot corresponding to a specific bar.Tags: None
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 |
Leave a comment: