Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plots and Dash Style

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

    Plots and Dash Style

    Hi there.The standard "channel indicators" are usually one colored, for the upper and lower lines as well as the region in between. I have worked my way through using the Plot method creating a color painted band between Upper and Lower with differently colored upper and lower boundary lines depending on whether these are rising or falling.

    I have for example
    if (Rising(Lower)) PlotColors[2][0] = lineup;
    if (Falling(Lower)) PlotColors[2][0] = linedown;
    if (Rising(Upper)) PlotColors[1][0] = Color.Transparent;
    if (Falling(Upper)) PlotColors[1][0] = Color.Transparent;

    I'd like to individually set the Dash Style depending on certain conditions.

    I have tried adding e.g.

    if (Rising(Upper)) PlotColors[1][0] = Color.Transparent;
    if (Rising(Upper)) Plots[1].Pen.DashStyle = DashStyle.Dash;
    but it then uses this DashStyle for ALL Plots[1].

    Plots[1][0].Pen.DashStyle = DashStyle.Dash; doesn't work either.

    Is there a way to limit this to only apply to this condition, here Rising Upper but not apply it to Falling Upper?

    sandman

    PS: What is the practical difference between using either
    PlotColors[0][0] = Color.Blue;
    or
    Plots[0].Pen.Color = Color.Blue;
    Last edited by sandman; 08-27-2018, 02:18 AM.

    #2
    Hello sandman,

    Thanks for your post.

    The DashStyle (and PlotStyle) can only apply to the entire plot.

    PlotColors allows you to change the pen color on a specific bar.

    The difference between PlotColors and Pen.Color is that PlotColors would apply to a specific bar while changing the Pen color would apply to the entire plot.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    82 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    43 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
    56 views
    0 likes
    Last Post CarlTrading  
    Working...
    X