• 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 woodyfox, Yesterday, 08:33 PM
          0 responses
          2 views
          0 likes
          Last Post woodyfox  
          Started by rblunsom, Yesterday, 11:19 AM
          2 responses
          26 views
          0 likes
          Last Post guidoisot  
          Started by drewski1980, Yesterday, 02:38 PM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by jfep1977, Yesterday, 02:31 PM
          2 responses
          13 views
          0 likes
          Last Post jfep1977  
          Started by dmking, Yesterday, 12:39 PM
          6 responses
          24 views
          0 likes
          Last Post dmking
          by dmking
           
          Working...
          X