Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

do not plot value

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

    do not plot value

    I created a value of +1 and -1 depending upon the color of a bar. The problem is that it screws up the scale because it plots the value of 1 or -1.

    How do I not get the value to plot? here is some of my code to see where I am going wrong.

    protectedoverridevoid Initialize()
    {
    Input = Median;
    Add(
    new Plot(Color.Green, PlotStyle.Hash, "UpTrend"));
    Add(
    new Plot(Color.Red, PlotStyle.Hash, "DownTrend"));
    Add(
    new Plot(Color.Red, PlotStyle.Hash, "buysellTrend")); // +1 uptrend / -1 downtrend
    CalculateOnBarClose = true;
    .....
    .....
    #region Properties
    [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 buysellTrend
    {
    get { return Values[2]; }
    }

    Thanks
    Attached Files
    Last edited by velocity; 05-30-2009, 09:20 PM.

    #2
    Somewhere in your code you are setting values to your plots, such as:

    UpTrend.Set(value);

    How about setting the indicator parameter "Auto scale" to false when adding the indicator to your chart?
    RayNinjaTrader Customer Service

    Comment


      #3
      Velocity,

      If your intention is to have a DataSeries that is accessible for a strategy or other indicator (Signal -1: short, Signal 1: long), then you can do it without a Plot. Just do:

      #variables
      private DataSeries signal;

      #init
      signal = new DataSeries(this);

      #onbarupdate
      Signal.Set(1); // long
      Signal.Set(-1); // short

      #parms
      public DataSeries Signal
      {
      get { return signal; }
      }


      Alternatively, you can do as Ray suggests and set auto scale to false, it will solve the problem as well.

      Mike

      Comment


        #4
        thansk guys, that solved it.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X