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 helpwanted, Today, 03:06 AM
        1 response
        14 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X