• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Have new Plots drawn after old Plots

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

    Have new Plots drawn after old Plots

    When writing an indicator I often do an initial draft, test it, get ideas and then want to add additional Plots. The problem is that the way NT renders Plots, the old Plots get drawn on top of the new Plots, so you can't see the new ideas very well.

    This means you have to continually go back and shift around the index returned by the DataSeries and the order that the Plots are added.

    For instance, if you started out with OldPlot at values index 0, then added NewPlot later at values index 1, you have:

    Code:
                    Add(new Plot(upColor, PlotStyle.Line, "OldPlot"));               
                    Add(new Plot(downColor, PlotStyle.Line, "NewPlot"));              
            ...
    
            [Browsable(false)][XmlIgnore()]
            public DataSeries OldPlot
            {
                get { return Values[0]; }
            }
    
            [Browsable(false)][XmlIgnore()]
            public DataSeries NewPlot
            {
                get { return Values[1]; }
            }
    However that will not look very good because OldPlot gets drawn on top of NewPlot. You have to change it to:

    Code:
                    Add(new Plot(downColor, PlotStyle.Line, "NewPlot"));              
                    Add(new Plot(upColor, PlotStyle.Line, "OldPlot"));               
            ...
    
            [Browsable(false)][XmlIgnore()]
            public DataSeries OldPlot
            {
                get { return Values[1]; }
            }
    
            [Browsable(false)][XmlIgnore()]
            public DataSeries NewPlot
            {
                get { return Values[0]; }
            }
    When you have 10 Plots on an indicator it starts to get cumbersome.

    I've decided to make a small framework to get around this problem. However, it would be great if there were simply an option such as the zorder option to have Plots drawn in reverse order. Something like reversePlotDrawOrder=true, or something similar.

    #2
    Hello meinl,

    Thank you for writing in and for your suggestion.

    I have entered a feature request on your behalf to add this functionality of allowing an indicator Plots Zorder to be set programmatically. Once I have a tracking ID for this I will post this in this thread.

    Please let us know of any other requests or suggestions you may have.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi meinl,

      I have received a tracking ID for the feature request to allow the z-order of plots programmatically. This is being tracked with ID# SFT-710.

      Thank you for taking the time to make this suggestion. Please let us know of any other suggestions or requests you may have.
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by xsgex, Yesterday, 09:46 PM
      0 responses
      2 views
      0 likes
      Last Post xsgex
      by xsgex
       
      Started by Steve L, Yesterday, 09:36 PM
      0 responses
      1 view
      0 likes
      Last Post Steve L
      by Steve L
       
      Started by krugman25, Yesterday, 09:34 PM
      0 responses
      4 views
      0 likes
      Last Post krugman25  
      Started by indy73, Yesterday, 04:42 PM
      0 responses
      15 views
      0 likes
      Last Post indy73
      by indy73
       
      Started by Italianforex, Yesterday, 06:20 AM
      2 responses
      13 views
      0 likes
      Last Post gplatis
      by gplatis
       
      Working...
      X