• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Overriding Plot in Indicator

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

    Overriding Plot in Indicator

    In Ninjatrader 8 I am trying to override Plot:

    public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
    {
    base.Plot(graphics, bounds, min, max);
    // More code will be added
    }


    I get error nummer CS0246. Could not find type or namespace Graphics.
    Should this be working?

    #2
    Hello,

    Thank you for the question.

    The Plot override is no longer used along with the Graphics object, instead SharpDX is now used for Rendering. For an example, please see the SampleCustomPlot Indicator, the override has changed to OnRender.

    You can locate the documentation here for the new override: http://ninjatrader.com/support/helpG...htsub=onrender

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I tried searching the "Code Breaking Changes" help page for "override" "plot" "graphics" AND "onRender", but I did not find anything, until I searched the forum for "plot override graphics"

      I also tried searching the Reference Samples, but I did not find any description that would give a clue how this can be converted to NT8.

      Just thought you should know, someone might want to add that to the Code Breaking Changes help page

      Comment


        #4
        It's interesting to see no reponse on this from NT, I am also having the same problem now. Anyone from NT team?

        Comment


          #5
          Hello asmmbillah,

          NinjaTrader 7 uses GDI+ Graphics for chart rendering while NinjaTrader 8 uses SharpDX for chart rendering. As this code is incompatible, it will need to be rewritten to do the same in NinjaTrader 8.

          Our SampleCustomRender indicator that comes with NinjaTrader 8 can be referenced for how SharpDX can be used in OnRender().

          Further important information on SharpDX rendering can be found here - https://ninjatrader.com/support/help..._rendering.htm

          Language Reference for SharpDX can be found here - https://ninjatrader.com/support/help..._reference.htm

          Please let us know if you have any additional questions.
          JimNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Italianforex, Today, 06:20 AM
          2 responses
          9 views
          0 likes
          Last Post gplatis
          by gplatis
           
          Started by alextrd, Today, 01:51 PM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_JoshG  
          Started by Boonfly8, Today, 12:10 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by NinjaTrader_PaulH, Today, 11:24 AM
          0 responses
          6 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by catulopc, Today, 10:58 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_SergeyS  
          Working...
          X