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

newbiw wondering how to stop series from being plotted

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

    newbiw wondering how to stop series from being plotted

    Hi,

    I'm a newbie with ninjascript and have been fiddling with a ninjascript extension to get it to do what i want (basically a series of SMA arithmetic calculations) and am kind of there in that i have created a series of SMA based algorrithms which all plot correctly in a chart and appear in market analyser BUT now i have so many lines plotted i need to reduce them to just 1 of the 4 to be plotted and I'm struggling with how to do it.

    To add additional series I figured out i need to add the following code :



    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "TallCandleHeight"));

    TallCandleHeight.Set(CandleHeight[0] * 1.46);

    [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 TallCandleHeight
    {
    get { return Values[3]; }


    I am assuming that the Add noew plot automatically defines the series so I am wondering what to replace this with so that i still get the underlying series data in the chart (detail box) and market analyser but without plotting on the chart


    thx for any help

    ian

    #2
    Hi Ian,

    so that i still get the underlying series data in the chart (detail box) and market analyser
    For both of these the value must be a plot. Only plots show up in data box and market analyzer.

    What you can do to hide the visual is set the plot color to the same color as the chart background. It will still show up in the data box and be available in MA, but you won't see it when applied to a chart.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thx .. i should have thought of this one :-)

      Comment


        #4
        hi,
        making some of the plots transparent colour did make them disappear but the automatic scale puts the visible plots (ratios -1.0 <->+1.0) right at the bottom (the transparent plot values are 10-20x larger absolute values)
        is it possible to manually set in either the chart settings or ninjascript indicator code the scaling in Panel 2 (for this indicator in my case) to be +1 to -1 ?
        thx
        ian

        Comment


          #5
          Yes, you can do a couple things for this.
          *Manually set the scale. In the vertical (price) axis: Right Click > Properties > Change Range to Fixed and specify your range.

          *Set Autoscale property of indicator to false. Right Click on Chart > Indicators > Select an indicator currently applied > Set Autoscale to false. This means the indicator won't be included in automatic scaling.

          Can set this property programatically as well:
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cre8able, Today, 03:20 PM
          1 response
          9 views
          0 likes
          Last Post cre8able  
          Started by fiddich, Today, 05:25 PM
          0 responses
          3 views
          0 likes
          Last Post fiddich
          by fiddich
           
          Started by gemify, 11-11-2022, 11:52 AM
          6 responses
          804 views
          2 likes
          Last Post ultls
          by ultls
           
          Started by ScottWalsh, Today, 04:52 PM
          0 responses
          4 views
          0 likes
          Last Post ScottWalsh  
          Started by ScottWalsh, Today, 04:29 PM
          0 responses
          10 views
          0 likes
          Last Post ScottWalsh  
          Working...
          X