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

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 nightstalker, 05-04-2024, 02:05 PM
            4 responses
            44 views
            1 like
            Last Post Leeroy_Jenkins  
            Started by Drone360x, Today, 10:27 AM
            0 responses
            1 view
            0 likes
            Last Post Drone360x  
            Started by NUVERSA, Today, 10:08 AM
            2 responses
            12 views
            0 likes
            Last Post NUVERSA
            by NUVERSA
             
            Started by truepenny, Today, 03:45 AM
            4 responses
            20 views
            0 likes
            Last Post truepenny  
            Started by truepenny, Today, 03:59 AM
            5 responses
            22 views
            0 likes
            Last Post truepenny  
            Working...
            X