Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

drawing hash / dash for 5 bars (NT8)

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

    drawing hash / dash for 5 bars (NT8)

    Hi

    My indicator currently plots a red or blue hash above / below a bar on its close if it meets my definition, however how do I change the hash to plot a dash say for the next 5 bars ?

    AddPlot(new Stroke(Brushes.Red,2), PlotStyle.Hash, "Upside");

    AddPlot(new Stroke(Brushes.Blue,2), PlotStyle.Hash, "Downside");

    Thanks to anyone who can help

    Regards
    Craig

    #2
    Hello cwhitelaw,

    Thanks for opening the thread.

    It wouldn't be possible to stretch a plot to span over a certain number of bars, but it is certainly possible to come up with the visual result.

    You could for example, use Drawing Objects to place a visual object for the next five bars after your plot.

    Another approach would be to add additional plots so you plot hashes for as many bars you would like the plot to stay at that level.

    For example, adding 5 additional plots and then assigning Values[0][0] (for plot 0) to be the current plot value, and then assigning Values[1][0] (for plot 1) to be the value from Values[0][1] (Plot 0's previous value) and so on.

    Different Drawing objects you may wish to use are documented here: https://ninjatrader.com/support/help...us/drawing.htm

    For modifying Values please see here: https://ninjatrader.com/support/help...-us/values.htm

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

    Comment

    Latest Posts

    Collapse

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