Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using public override void Plot and Values[1].Set

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

    Using public override void Plot and Values[1].Set

    I am using the.
    public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)

    To draw candlesticks in the indicator window.

    How do I get my moving average to overlay the candlestick?

    Values[1].Set(SMA(Midband,5)[0]);

    And how do I get the current calculation of the candlestick bar in the pricepane, the price marker, thanks

    Tinkerz

    #2
    tinkerz,

    Working with the Plot() is not supported. If you want to paint regular plots please use the regular Add(new Plot()); in Initialize().

    I am not quite sure what you mean by the price marker on the price pane? Price markers will show for any plots you use and the original candlesticks. It sounds like you might actually be better served if you custom programmed a chart type. Please see, for example, RangeAlt downloadable from the file sharing section.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok plots are not supported, How can I make sure the Moving Average plot is plotted on top of everything else in the indicator pane

      Comment


        #4
        tinkerz,

        Z-order is only customizable in NT7. For 6.5, you simply have to add them in the desired order.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I didn't think this question warranted its own thread, so I figured I'd ask here: what am I doing wrong when I try and use Plot() in this way?

          PHP Code:
          public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
          {
          things
          } 
          
          The error I get referring to the line with Plot() is "no suitable method found to override"

          Comment


            #6
            Hello,

            Thanks for the note.

            Specifically where do you have this code in relation to the code file. Its not inside of OnBarUpdate() or anything like that right?


            I look forward to assisting you further.
            BrettNinjaTrader Product Management

            Comment


              #7
              My code is arranged like this

              PHP Code:
                      protected override void Initialize()
                      {
                      }
                                  
                      protected override void OnStartUp()
                      {
                      }
                      
                      public override void Plot(Graphics graphics, Rectangle bounds, double min, double max) 
                      {
                      }
                      
                      protected override void OnBarUpdate()
                      {
                      } 
              

              Comment


                #8
                Hello,

                Thanks for that, looks good.

                Is this an indicator or a strategy?

                I look forward to assisting you further.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  This is all in a strategy.

                  Comment


                    #10
                    Hello,

                    This would be why then,unfortunately plot only exists inside of an Indicator.

                    -Brett
                    BrettNinjaTrader Product Management

                    Comment


                      #11
                      OK no problem, thanks for the info.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      651 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      370 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      109 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      574 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      577 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X