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 Ashkam, 04-29-2024, 09:28 AM
        4 responses
        43 views
        0 likes
        Last Post Ashkam
        by Ashkam
         
        Started by nightstalker, Yesterday, 02:05 PM
        1 response
        29 views
        0 likes
        Last Post NinjaTrader_Eduardo  
        Started by dcriador, Today, 02:09 PM
        0 responses
        5 views
        0 likes
        Last Post dcriador  
        Started by nicthe, Today, 07:38 AM
        4 responses
        21 views
        0 likes
        Last Post bltdavid  
        Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
        30 responses
        98 views
        0 likes
        Last Post cmtjoancolmenero  
        Working...
        X