Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 inanazsocial, Today, 01:15 AM
            0 responses
            1 view
            0 likes
            Last Post inanazsocial  
            Started by trilliantrader, 04-18-2024, 08:16 AM
            5 responses
            22 views
            0 likes
            Last Post trilliantrader  
            Started by Davidtowleii, Today, 12:15 AM
            0 responses
            3 views
            0 likes
            Last Post Davidtowleii  
            Started by guillembm, Yesterday, 11:25 AM
            2 responses
            9 views
            0 likes
            Last Post guillembm  
            Started by junkone, 04-21-2024, 07:17 AM
            9 responses
            70 views
            0 likes
            Last Post jeronymite  
            Working...
            X