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

Plot(Signatures)

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

    Plot(Signatures)

    The documentation for Plot shows four different signatures with two or three arguments:

    Plot(Color color, string name)
    Plot(Pen pen, string name)
    Plot(Color color, PlotStyle plotStyle, string name)
    Plot(Pen pen, PlotStyle plotStyle, string name)


    In the HeikenAhsi indicator on line 228 I see a Plot override with four arguments which are completely different types than what is listed in the Help Docs.

    Code:
    public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
    Question: Is there another version of Plot?

    The reason for my question is; I'm having difficulty with the accuracy of the DrawRectangle() method. I've been been told it might be better to overwrite Plot and use core C# graphics classes. Any advice (or demo code)?


    Thank You,
    Rob
    Last edited by RobVig; 06-13-2016, 07:50 PM.

    #2
    Originally posted by RobVig View Post
    overwrite Plot
    You mean override, not overwrite.

    Have you found @CustomPlotSample.cs in your bin/Custom/Indicator folder?

    Comment


      #3
      Hello RobVig,

      Thank you for the question.

      The Plot override in NT7 was never documented as it was an advanced topic, but it does exist and can be used.

      There is a sample that comes with the platform named CustomPlotSample you could review to judge how difficult it would be. Using this override, you are no longer stuck to a time and price axis and instead can use X and Y coordinates.

      If you have further questions in your development please feel free to post them, as this is an un supported topic in NT7 the forum will likely be the best resource for questions you may have.

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

      Comment


        #4
        Yes, typo (overwrite).
        I'll take a look at : CustomPlotSample.cs
        Any thoughts on the heiken-ashi Plot on line 228?
        Last edited by RobVig; 06-14-2016, 12:23 PM.

        Comment


          #5
          Hello,

          If you meant 228 from the original post, the Plot override is what I was just describing in post #3. This override can be used in any indicator but has no documentation because it was never technically a supported item in NT7.

          A simple example of this override can be found in the CustomPlotSample file in the Miscellaneous region of the script.

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

          Comment


            #6
            Nt 8

            Is this override also available in NT8? There is currently no sample code or other documentation that I have found.

            If so, where might I find documentation? and
            if not, how is this to be implemented?

            Comment


              #7
              Hello,

              This override is available in NT8, but NT8 uses SharpDX instead of the GDI graphics object in NT7.

              This is now documented and is available for most NinjaScript types. The Plot override is now replaced with The OnRender override.

              For examples in NT8, please see any of the following:
              *Any drawing tool, edit the source code in the NinjaScript editor and look for OnRender
              *SampleCustomPlot indicator
              *Pivots indicator
              *http://ninjatrader.com/support/helpG...htsub=OnRender

              Because we are in the NT7 forum, I would ask that you create a new topic in the NT8 forum for any specific questions you may have related to OnRender.

              Please let me know if I may be of further assistance.
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by rocketman7, Today, 02:12 AM
              3 responses
              20 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              7 responses
              27 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by samish18, 04-17-2024, 08:57 AM
              17 responses
              65 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by briansaul, Today, 05:31 AM
              1 response
              13 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by PaulMohn, Today, 03:49 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X