Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with lower indicator window drawing tools

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

    Help with lower indicator window drawing tools

    I am trying to find which drawing tools are compatible with the lower indicator window where the RSI indicator would be plotted. I am going through the documentation http://ninjatrader.com/support/helpG...brushesall.htm
    Almost none of these drawing tools seem to work on the lower indicator window.

    Where can I find what drawing tools are available for the lower indicator window without having to try them all individually?
    In the photo taken from tradingview I included I can create background channel fills between Y axis ranges how can this be done in ninjascript?

    Thanks​​​​
    Last edited by AlgoDreamer; 05-16-2024, 10:42 AM.

    #2
    Hello AlgoDreamer,

    Thank you for your post.

    Are you referring to drawing tool methods like Draw.Dot(), or BackBrushes (which is what you have linked to)?

    Please note that Drawing objects (e.g. Draw.Dot()) can only be drawn into the panel owned by the script (primary series), or the price panel.

    Here is a sample script which draws a dot using Draw.Dot() on the panel owned by the script.

    I am trying to draw a vertical line on the DMI indicator panel, but the code below doesn't do it and I can't tell what mistake am I making. Also, when I copy the code from the NT8 editor, it inserts large spaces to the left that I then have to delete so that I align the code properly. Is there a way of copying multiple lines


    If you have further questions, please let me know.

    Comment


      #3
      Draw.Dot() can work on the chart or the lower indicator window but a lot of the drawing tools like

      HorizontalLine myLine = Draw.HorizontalLine(this, "tag1", 5321, Brushes.Green);
      // Set a new Stroke for the object
      myLine.Stroke = new Stroke(Brushes.Green, DashStyleHelper.Dash, 5);

      Only work on the chart window and not on the lower indicator window. Is there anywhere in the documentation that specifies which drawing tools work in the lower indicator window so I don't have to go through and try each one to see if they work in the lower indicator window? But what I am actually trying to find is a way to fill the background with a color between ranges on the Y axis in the lower indicator window. In the photo I attached you can see the red, blue, and green backgournd fills.

      I see that this does work in the lower indicator window

      // Sets the color of the background on the current bar as blue
      BackBrushes[0] = Brushes.Blue;
      // Sets the color of the background on the previous bar as orange
      BackBrushes[1] = Brushes.Orange;​

      But I cannot set the range on either the x or y axis in the lower indicator window to which I want the fill to appear. Is there a way to do this in ninjascirpt? ​

      Comment


        #4
        Hello AlgoDreamer,

        Thank you for your response.

        Draw.Line also works to draw on the panel the indicator is applied to - this applies to all Drawing objects (except Draw.TextFixed, which is noted in its Help Guide page). Please see the attached sample script which demonstrates drawing both a line and a dot in the indicator panel.

        If your drawing object is not appearing as expected, you will likely need to debug the script to figure out the cause.

        BackBrushesAll (as opposed to just BackBrushes) will color the background on all chart panels.

        To draw between two regions on the chart, you can use Draw.Region().







        This sample code (at the link below) also demonstrates drawing a region in the indicator panel:



        Please let us know if you have any further questions.
        Attached Files

        Comment


          #5
          You are right Draw.HorizontalLine and Draw.RegionHighlightY do work in the lower indicator window this is exactly what I was looking for thank you so much!​

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          630 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          566 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X