Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

second data set wont plot

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

    second data set wont plot

    I know I am probably missing something obvious, but when I try to plot

    Add(new Plot(Color.Pink, "IchiLowSpread"));
    Add(new Plot(Color.Orange, "IchiCloseSpread"));

    only one of them actually plots...is there something I have to initialize to get the second plot to show up? (also, I didn't create a data series for either, is that something I must do? or can I just plot the data? )

    thx

    #2
    Hello nightriderx,

    In addition to the statement you wrote, you need code in the properties region for each plot. The Values[] index increases by one for each plot you add.

    [Browsable(false)]
    [XmlIgnore()]
    public DataSeries IchiCloseSpread
    {
    get { return Values[1]; }
    }
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Yeh, I got those too, but its a no go.

      the rest of my code is very simple:

      protected override void OnBarUpdate()
      {

      if (CurrentBar < 5)
      return;


      IchiLowwSpread.Set(Low[1] - Ichimoku(BarsArray[0], 9, 26, 52).TenkanSen[1]);
      IchiCloseSpread.Set(WMA(2)[0] - Ichimoku(BarsArray[0], 9, 26, 52).TenkanSen[0]);

      }

      Comment


        #4
        Is there any particular need to use BarsArray[0] here rather than Close[0]? BarsArray is typically used with multiple series indicators.

        Are there any error messages in log tab of the control center?
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          I removed the barsArray statement, but still no go.

          Comment


            #6
            Check the log tab of the control center for any error messages. If you post the complete code or share the file we can try on our side.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

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