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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        152 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        89 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        133 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        127 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        107 views
        0 likes
        Last Post CarlTrading  
        Working...
        X