Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

plot dash line

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

    plot dash line

    I am trying to plot a dashed line. Thought the following code would do it, but it does not plot a dashed line. In stead I get a dot. Where am I going wrong?

    protectedoverridevoid Initialize()
    {
    Add(
    new Plot(new Pen(Color.FromKnownColor(KnownColor.Yellow), 2), PlotStyle.Line, "High"));
    Add(
    new Plot(new Pen(Color.FromKnownColor(KnownColor.Blue), 2), PlotStyle.Dot, "Low"));
    // Set the pen used to draw the plot as a dashed line
    Plots[1].Pen.DashStyle = DashStyle.Dash;

    Thanks

    #2
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Blue), 2), PlotStyle.Dot, "Low"));

    Try changing to Line.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      Thanks, That did the trick. Kind of strange though that since it is overriding the Line that it would not override the Dot.

      Oh well. Thanks again.

      Comment


        #4
        I would think it is because a line can be a dashed line but a dot cant be dashed?
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ageeholdings, Today, 07:43 AM
        0 responses
        7 views
        0 likes
        Last Post ageeholdings  
        Started by pibrew, Today, 06:37 AM
        0 responses
        4 views
        0 likes
        Last Post pibrew
        by pibrew
         
        Started by rbeckmann05, Yesterday, 06:48 PM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by llanqui, Today, 03:53 AM
        0 responses
        6 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by burtoninlondon, Today, 12:38 AM
        0 responses
        12 views
        0 likes
        Last Post burtoninlondon  
        Working...
        X