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

Plot0

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

    Plot0

    I did a search and replace in my indicator for "Plot0" and replaced it with "MySignal" when I did that it, it made 4 replacements.

    I then compiled and got an error saying there was no definition of Plot0

    What am I doing wrong?

    #2
    Hi Velocity, it would not be smart for me to just take a guess at your problem. Could you please post the code that generates the error? The error should tell you exactly where to find it--you can actually double click on the error and you'll be taken right to it.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Here you go. All I did was search and replace Plot0 with Myplot and I got the following error: indicator xxxxx does not contain a definition for Plot0.

      where am I going wrong?

      thanks
      -------------------------------------------------------

      #region Variables
      // Wizard generated variables

      private DataSeries mySignal; // defining custom data series

      #endregion


      /// </summary>
      protected override void Initialize()
      {
      Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Myplot"));
      CalculateOnBarClose = false;
      Overlay = true;
      PriceTypeSupported = false;

      mySignal = new DataSeries(this); // syncronizing the new custom dataseries
      }
      /// </summary>
      protected override void OnBarUpdate()
      {

      if (CurrentBar < (periodLookback +1))
      return;


      if
      (Open[1] != Close[1])

      {
      mySignal.Set(1); //buy
      }


      if
      (Open[1] != Close[1])

      {
      mySignal.Set(-1); //sell
      }

      Myplot.Set(mySignal[0]);

      }

      #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

      [Description("write something here")]
      public DataSeries Myplot
      {
      get { return Values[0]; }
      }

      Comment


        #4
        Velocity,

        If NT could resolve this, that would be great.

        In the past, I've had to build a brand new indicator with the desired changes when this happened.

        RJay
        RJay
        NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

        Comment


          #5
          Velocity, if you doubleclick on the listed error, in which section is it found?
          BertrandNinjaTrader Customer Service

          Comment


            #6
            RT6176, thanks, I will try that.

            also, the error help link was of no assistance

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by algospoke, Yesterday, 06:40 PM
            2 responses
            24 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            15 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            46 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            23 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            181 views
            0 likes
            Last Post jeronymite  
            Working...
            X