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

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 itrader46, Today, 09:04 AM
          0 responses
          3 views
          0 likes
          Last Post itrader46  
          Started by timmbbo, Today, 08:59 AM
          0 responses
          1 view
          0 likes
          Last Post timmbbo
          by timmbbo
           
          Started by bmartz, 03-12-2024, 06:12 AM
          5 responses
          33 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          14 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X