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