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

Adding more than 4 plots to a chart

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

    Adding more than 4 plots to a chart

    I am new to NT. Using the Wizard will allow only 4 plots. I want to plot up to 12 EMA(close), like Guppy Multilple Moving Average, and then to generate signals/alerts based on several conditions. (I can do it in AmiBroker)
    The Add(new Plot.............................. ) is OK, but when I add the next plot No, ie
    Plot4.Set(EMA(Close, 15)[0];
    and then try to compile the code, the error message is
    The name "Plot4" does not exist in the current context.

    How can I add more than 4 EMA plots and other types of plots
    Thank you for any suggestions,
    Bill R

    #2
    Bill,

    Please check the "Properties" section of the code and make sure there is reference to the additional plots you are adding from there. You will need to expand the minimized “Properties” section by clicking on the + sign on the left.

    You should see an example of how the original plots are formatted from the Wizard which can be duplicated to add additional plots.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Your reply was super fast. I thought that area was "off limits", so I didn't go there. I will try this tomorrow. It is now 11:30 pm local time and well past my bedtime.
      Thank you for making my day.
      Bill R

      Comment


        #4
        Thanks for the update.


        There is a section below that is labeled "NinjaScript Generated Code" which cannot be change.

        However, the Properties where your plots are configured can be.

        What you add should look something like:

        Code:
          [Browsable(false)]    // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
                [XmlIgnore()]        // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
                public DataSeries Plot4
                {
                    get { return Values[4]; }
                }
        MatthewNinjaTrader Product Management

        Comment


          #5
          Thanks again, as your suggestions have helped once again. This morning, I have tried what you have suggested, and now I have the extra plot. Got to do some house work for the better half now, but then I can get back to learning more about NT.
          It is an exciting journey
          Like most actions, it is easy when you know how.
          Bill R
          Last edited by oldhiker; 08-11-2011, 05:41 PM. Reason: Further comments

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by jclose, Today, 09:37 PM
          0 responses
          6 views
          0 likes
          Last Post jclose
          by jclose
           
          Started by WeyldFalcon, 08-07-2020, 06:13 AM
          10 responses
          1,414 views
          0 likes
          Last Post Traderontheroad  
          Started by firefoxforum12, Today, 08:53 PM
          0 responses
          11 views
          0 likes
          Last Post firefoxforum12  
          Started by stafe, Today, 08:34 PM
          0 responses
          11 views
          0 likes
          Last Post stafe
          by stafe
           
          Started by sastrades, 01-31-2024, 10:19 PM
          11 responses
          169 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X