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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    75 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    39 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X