Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator referencing

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

    indicator referencing

    Why does NT not like when I try to referrence the CCIAverage(7,15) which is -106.93 from another indicator?

    Instead of Indicator1_data.Set(CCIAverage(7,15).CCIAverage[0]); what should it be ?

    Thanks

    Please see attached.
    Attached Files

    #2
    velocity,

    Unfortunately we do not know how that indicator is programmed, but it looks like "CCIAverage" may not be the programmatically accessible name of that plot. I suggest you scroll through the Intellisense to see if you can find the appropriate plot.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,

      this is what the indicator code looks like, I highlighted the bold text and it looks right to me. i.e. value1 = CCIAverage Any thoughts?

      publicclass CCIAverage : Indicator
      {
      #region Variables
      privateint period = 14;
      privateint avPeriod = 7;
      #endregion
      ///<summary>
      protectedoverridevoid Initialize()
      {
      Add(
      new Plot(Color.Orange, "CCI"));
      Add(
      new Plot(Color.Red, "CCIAverage"));
      ......


      }
      protectedoverridevoid OnBarUpdate()
      {
      if (CurrentBar == 0)
      Values[
      0].Set(0);
      else
      {
      ......

      Values[
      0].Set((Typical[0] - SMA(Typical, Period)[0]) / (mean == 0 ? 1 : (0.015 * (mean / Math.Min(Period, CurrentBar + 1)))));
      Values[
      1].Set(SMA(Value, AvPeriod)[0]);
      }

      Comment


        #4
        Check the Properties region of the code. The Add() line just gives you a display name. It is not the actual plot name.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          does not look like there is anything of value there....

          #region Properties
          ///<summary>
          ///</summary>
          [Description("Numbers of bars used for calculations")]
          [Category(
          "Parameters")]
          publicint Period
          {
          get { return period; }
          set { period = Math.Max(1, value); }
          }
          [Description(
          "CCI MA Period")]
          [Category(
          "Parameters")]
          publicint AvPeriod
          {
          get { return avPeriod; }
          set { avPeriod = Math.Max(1, value); }
          }
          #endregion

          Comment


            #6
            Then CCIAverage(...).Values[1][0].
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              That did it. THANKS!!!

              Comment

              Latest Posts

              Collapse

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