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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X