Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Public Property is not available

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

    Public Property is not available

    I have an indicator that does calculations only
    I have variable iSeries Series<double> that is updated on bar update
    I also have a variable double aValue that is also calculated on bar update

    In my Properties section I have
    [Browsable(false)]
    [XmlIgnore()]
    public Series<double> PublicSeries
    {
    get { return iSeries; }
    }

    This works and I can get this value from another indicator that contains this indicator
    however When I do the following:

    [Browsable(false)]
    [XmlIgnore()]
    public double PublicValue
    {
    get { return aValue; }
    }

    I don't get any value in the indicator that contains this indicator. But I have verified that the indicator that is doing the calculations is producing a double value.

    #2
    Hello Itachi,

    Call Update(); in the getter.

    Below is a link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I tried that, but it did not resolve the problem. What I don't understand is why a Series works and the other does not

      To possibly make it clearer here is what is in the OnBarUpdate() method

      minimum = MIN(iLevel, 100)[0];
      Print("Min Level : " + lowerThreshold.ToString()); // Now in the OnBarUpdate(), This value will print out. I do get a double value.

      Now in the Properties I try making this available even with the suggested Update() method, but it doesn't work. when trying to retrieve the value from the parent indicator.
      In the parent indicator I use

      [Browsable(false)]
      [XmlIgnore()]
      public double LowerThreshold
      {
      get { Update(); return lowerThreshold; }
      }


      In the Parent indicator in the OnBarUpdate() I set plot values retrieving the Series from the child indicator which works fine
      SomePlot[0] = _someLevel.SomeLevel[0];

      When I try the same for a single value though It doesn't work
      lower = _someLevel.LowerThreshold;

      Comment


        #4
        Hello Itachi,

        I am not able to reproduce any issue.

        Attached is an exported test script and the output I am seeing appear in the output window.
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        331 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        549 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        549 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X