Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access Incidator Series Data from Strategy

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

    Access Incidator Series Data from Strategy

    I have a custom indicator that along with some plots also
    Code:
    Series<double>
    properties for data that I want to track, but not plot.

    Whenever I access
    Code:
    customIndicator.SeriesX[0]
    from the strategy the value is always zero.

    Is this something that is not supported. Can only plotted values be referenced?

    Any help or tips what be greatly appreciated.

    #2
    Hello calebsandfort,

    Thank you for the post.

    Please see this reference sample that demonstrates how to expose indicator values that are not plots:



    The important parts are the public properties of the series in the #region Properties section of the SampleBoolSeries.cs indicator file.

    Please let me know if I can assist further.

    Comment


      #3
      Originally posted by calebsandfort View Post
      I have a custom indicator that along with some plots also
      Code:
      Series<double>
      properties for data that I want to track, but not plot.

      Whenever I access
      Code:
      customIndicator.SeriesX[0]
      from the strategy the value is always zero.

      Is this something that is not supported. Can only plotted values be referenced?

      Any help or tips what be greatly appreciated.
      Hi Chris

      Thanks for sending this along. This is basically what I was doing, but instead of doing
      Code:
      SampleBoolSeries().BullIndication[0]
      , I was doing
      Code:
      boolIndicator.BullIndication[0]
      where boolIndicator is a variable I initialized at the start of the strategy.

      So, is it necessary to create a new instance of the indicator each time in OnBarUpdate?

      Comment


        #4
        Hello calebsandfort,

        Thank you for the reply.

        You can set up the indicator at the class level to make one instance of it. I have attached the modified example.

        Please let me know if you have any questions.
        Attached Files

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        77 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X