Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator vertical scale

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

    Indicator vertical scale

    Hi,

    I wrote an indicator which draws a rectangle based on some calculated data. Sometimes the rectangle height is pretty big and the chart would automatically adjust to it. (Please see a screenshot attached)

    Is there a way to avoid the chart resized based on indicators?

    Thanks.
    Attached Files

    #2
    Hello lkuo.me,

    Thanks for your post.

    When you apply the indicator to a chart, like any indicator, you can set the indicator visual parameter "autoscale" to false. This setting of false means that objects drawn by the indicator will not be included in the autoscaling of the chart, however, this also means that you may not see objects drawn by the indicator if they are not drawn on the scale in use at the time. You can toggle Autoscale on or off as you wish.

    Alternatively, you can code this in the Ninjascript using IsAutoScale = false; Reference: http://ninjatrader.com/support/helpG...sautoscale.htm

    Comment


      #3
      Hi, sorry for taking so long to reply.

      Wasn't able to solve the problem following the instruction. Do you mind take another look please?

      Thanks
      Attached Files

      Comment


        #4
        Make sure the autoscale input to the Draw.Rectangle is also false

        Draw.Rectangle(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, Brush areaBrush, int areaOpacity)

        Comment


          #5
          Hello lkuo.me,

          Thanks for your post.

          If member JerryWar's suggestion does not resolve the issue, please post your code so we can test on our end. Alternatively, if you prefer, please feel free to write into PlatformSupport[at]NinjaTrader[dot]Cpm, mark the e-mail atten: Paul and a link to this threa and attach the CS file to your e-mail.

          Comment

          Latest Posts

          Collapse

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