• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Make line plot vary between dash and dot style

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

    Make line plot vary between dash and dot style

    Hello,

    I have been changing color of my line plot through the if - else approach, like this:

    if (Plot0[0] > Plot0[1])
    {
    PlotBrushes[0][0] = Brushes.GhostWhite;
    }
    else if (Plot0[0] < Plot0[1])
    {
    PlotBrushes[0][0] = Brushes.Red;
    }
    else
    {
    PlotBrushes[0][0] = Brushes.Gray;
    }

    Could you please tell me the equivalent line I should utilize within the brackets in order to make the line go from dash to dot?

    Thank you,


    #2
    Hello catinabag,

    Thanks for your post.

    With a plot, you cannot change the PlotStyle or DashStyle in the same manner as the PlotBrush.

    The PlotStyle or DashStyle would be applied to the entire plot.

    You may be able to accomplish your goal by using multiple plots, each set to the DashStyle of your choice. I've attached a screenshot of a quick example.

    Click image for larger version

Name:	DashStylePlotExample.PNG
Views:	34
Size:	131.9 KB
ID:	1108664
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      cool - thank you !

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by WHICKED, Today, 01:01 PM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by polo0202, Today, 12:15 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_BrendanC  
      Started by GARZONJ, Today, 11:27 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by NtFan, Today, 11:08 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by anamaria0589, Today, 09:39 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Jermaine  
      Working...
      X