Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot an Horizontal line on chart with value from a strategy

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

    Plot an Horizontal line on chart with value from a strategy

    I need to plot an horizontal line on the chart with values taken from within a strategy.
    Do i have to create also an indicator? Any example available?

    Thx

    #2
    See this reference sample - http://www.ninjatrader-support.com/v...ead.php?t=6651
    RayNinjaTrader Customer Service

    Comment


      #3
      Ray,

      Along the same lines, how do I set a simple label on a line? I am using this to plot the current high and would like the label read "Current High" just above the line and to the far right:

      DrawHorizontalLine("CurrentHigh", CurrentDayOHL().CurrentHigh[0], Color.Chartreuse, DashStyle.Dot, 2);

      Thanks!

      Comment


        #4
        You can use DrawText() and see if that works.
        RayNinjaTrader Customer Service

        Comment


          #5
          Ray, that worked. Is there any way to align the text to the right of the current bars (like in the margin) so the bars do not interfere with the text? See attached where the blue down arrow is.
          Attached Files

          Comment


            #6
            No there is not.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            368 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            571 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X