Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawHorizontalLine

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

    DrawHorizontalLine

    Hi Guys, I am trying to insert a horizontal line that uses triangle up and triangle down but do not seem to have this option anywhere. Any idea how do I include this would be
    appreciated.

    DrawHorizontalLine("Line1", false, Close[0]-stop1*TickSize, Color.Magenta, DashStyle.Solid, 4);

    Thanks
    DJ

    #2
    Hello,

    You would not have control outside of the DashStyle when using DrawHorizontalLine like you have with Plots.

    You can always use DrawTriangleUp or DrawTriangleDown to draw these shapes.

    You maybe able to accomplish this by overriding the plot style, however we do not have a support NinjaScript method to for doing so.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks Matthew, How would you draw a row of horizontal triangles excatly as you can only set number of bars back and it draws only one triangle. Thanks. DJ

      Comment


        #4
        djkiwi,

        If you're using the draw triangle, making a single row of this could be pretty resource intensive.

        As an alternative, I'd suggest using draw text and "windings 3" as the font, which will allow you to draw an triangle up using "p" and triangle down using "q"

        Code:
        DrawText("UpTriangle" + CurrentBar, false, "ppppp", 0, Close[0]-stop1*TickSize, 0, Color.Magenta, new Font("Wingdings 3",8), StringAlignment.Near, Color.Transparent, Color.Transparent, 0);
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 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
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X