Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Code example / pointer for dashed/dot line via OnRender?

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

    Code example / pointer for dashed/dot line via OnRender?

    Hi,

    OK, so I do actually know how to draw a line in OnRender with a dashstyle, and it works. Kind of The issue, which native NT8 plots do not suffer with, is that if the distance between your draw.Line's is small (bar width is small), then the dash does not get a chance to render. As NT8 plots do not suffer in this manner (and are smoother), I am assuming they don't render with lines point to point, but use some form of geometry?

    Any examples available as a reference? Or a pointer to a possible better method?

    Thanks.

    #2
    Hello pjsmith,

    Thanks for your note.

    I have attached a modified version of my VPA conversion to demonstrate using geometry to draw a line with a dash style. This would be similar to how plots are drawn. The original script is linked below.

    VPA - https://ninjatraderecosystem.com/use...indicator-nt8/

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    Please let me know if I can be of further assistance.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    574 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X