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

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 trilliantrader, Today, 03:01 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by geddyisodin, Today, 05:20 AM
        6 responses
        34 views
        0 likes
        Last Post geddyisodin  
        Started by pechtri, 06-22-2023, 02:31 AM
        9 responses
        122 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by frankthearm, 04-18-2024, 09:08 AM
        16 responses
        67 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by habeebft, Today, 01:18 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X