• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding series to custom BarsType

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • adyle0
    started a topic Adding series to custom BarsType

    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.

  • adyle0
    replied
    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

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    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:

Latest Posts

Collapse

Topics Statistics Last Post
Started by Venom, Today, 01:05 PM
0 responses
2 views
0 likes
Last Post Venom
by Venom
 
Started by Dert66, Today, 12:11 PM
0 responses
6 views
0 likes
Last Post Dert66
by Dert66
 
Started by jjanguda, Today, 10:04 AM
0 responses
198 views
0 likes
Last Post jjanguda  
Started by sambo81, Today, 09:20 AM
1 response
12 views
0 likes
Last Post sambo81
by sambo81
 
Started by TopGunNote, 05-14-2019, 01:12 PM
3 responses
78 views
0 likes
Last Post dpaulw
by dpaulw
 
Working...
X