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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        65 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X