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

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 graphicsRectangle boundsdouble mindouble 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.

            Comment


              #7
              My code is arranged like this

              PHP Code:
                      protected override void Initialize()
                      {
                      }
                                  
                      protected 
              override void OnStartUp()
                      {
                      }
                      
                      public 
              override void Plot(Graphics graphicsRectangle boundsdouble mindouble 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.

                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

                    Comment


                      #11
                      OK no problem, thanks for the info.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Max238, Today, 01:28 AM
                      4 responses
                      36 views
                      0 likes
                      Last Post Max238
                      by Max238
                       
                      Started by r68cervera, Today, 05:29 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by geddyisodin, Today, 05:20 AM
                      1 response
                      11 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Started by timko, Today, 06:45 AM
                      2 responses
                      14 views
                      0 likes
                      Last Post NinjaTrader_ChristopherJ  
                      Started by habeebft, Today, 07:27 AM
                      0 responses
                      7 views
                      0 likes
                      Last Post habeebft  
                      Working...
                      X