Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer didn't show Plot value

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

    Market Analyzer didn't show Plot value

    I developed a indicator with a plot. I would like to use the plot for Market Analyzer.

    but when I added my indicator to Market analyzer, the plot value is empty. Could you let me know why? Please see the screen shot attached.

    Thanks!

    the other question, does Market Analyzer only use plot value? is it possible use Misc series value?



    #2
    Hello LadGta2018, thanks for your post.

    Can you give me details on how the indicator is programmed? Are there any errors in the log tab of the Control Center after loading the indicator onto the Market Analyzer?

    Please make sure you call AddPlot in the script at least once to add one plot.

    Market Analyzers will only display values from the Values[][] array, no public series can be displayed in the Market Analyzer

    I look forward to hearing from you.

    Comment


      #3
      Hi Chris,

      Thanks for your quick response. Please review my code below. I used "addPlot" to switch 2 different options of plot. Actually I added this plot just for Market Analyzer. I would like to hide this plot when I use it in the chart. Since my indicator draw other signals in the chart.



      if (State == State.SetDefaults)
      {
      addPlot = true;
      }
      else if (State == State.Configure)
      {
      AddPlot(Brushes.DarkCyan, "BuySellSignal");

      }


      protected override void OnBarUpdate()
      {

      if(addPlot)
      {
      Values[0][0] = High[0]; // plot option 1

      } else
      {
      Values[0][0] = Low[0]; // plot option 2
      }
      }


      [NinjaScriptProperty]
      [Display(Name = "AddPlot", Order = 1, GroupName = "Parameters")]
      public bool addPlot
      { get; set; }

      Comment


        #4
        the issue was the plot didn't get read by Market Analyzer, when I added this indicator into Market Analyzer. As the screenshot shown I attached.

        Comment


          #5
          Hello, thanks for your reply.

          Be sure to add a public property for the plot you are adding e.g.

          Code:
          if (State == State.SetDefaults)
          {
              AddPlot(Brushes.Tomato, "TestPlot");
          }
          
          ...
          
          #region Properties
          
          [Browsable(false)]
          [XmlIgnore]
          public Series<double> TestPlot
          {
              get { return Values[0]; }
          }
          #endregion
          Please let me know if this does not resolve your inquiry.

          Comment


            #6
            Hi Chris,

            Thanks.

            I added the code you were showing, but it is not helping.

            In my indicator, the namespace has sub folder showing below. Not sure if it matters.

            "namespace NinjaTrader.NinjaScript.Indicators.MyIndicator"

            Comment


              #7
              And the plot was working in chart prefect. it is just couldn't be read by Market Analyzer. Not sure why.

              Comment


                #8
                Hello LadGta2018, thanks for your reply.

                Does my attached example work on your end? If so what is this example doing differently than your indicator?

                I look forward to hearing from you.
                Attached Files

                Comment


                  #9
                  Originally posted by NinjaTrader_ChrisL View Post
                  Hello LadGta2018, thanks for your reply.

                  Does my attached example work on your end? If so what is this example doing differently than your indicator?

                  I look forward to hearing from you.
                  Hi Chris,

                  The code worked for me. Then I found the issue. "AddPlot" should be in "SetDefaults" section, not "Configure" section. Thanks for your help. I appreciated your time.

                  --------------------------------------------------------------------------------------------------------------------

                  if (State == State.SetDefaults)
                  {
                  addPlot = true;
                  }
                  else if (State == State.Configure)
                  {
                  AddPlot(Brushes.DarkCyan, "BuySellSignal");

                  }

                  ---------------------------------------------------------------------------------------------------------------------------------

                  Comment


                    #10
                    The other question come out. I created this plot just for Market Analyzer. Since this plot is 0 or 1, it will mess the scale of my chart. How can I hide this plot when I use it in chart? but still keep the value for Market Analyzer.

                    And I couldn't create another indicator to pass the plot since the way I am coding.

                    Comment


                      #11
                      Hello LadGta2018, thanks for your reply.

                      Set the default Brush to Brushes.Transparent. This will make it invisible while on the chart.
                      AddPlot(Brushes.Transparent, "BuySellSignal");

                      Please let me know if I can assist any further.

                      Comment


                        #12
                        Hi Chris,

                        Thanks for your help!

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        601 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        347 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        103 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        559 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        558 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X