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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        156 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        90 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        140 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        130 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X