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 kinfxhk, 07-14-2026, 09:39 AM
            0 responses
            127 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 10:18 AM
            0 responses
            105 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 09:50 AM
            0 responses
            85 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 07:21 AM
            0 responses
            105 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-11-2026, 02:11 AM
            0 responses
            86 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Working...
            X