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

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
    Paul H.NinjaTrader Customer Service

    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.
          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by judysamnt7, 03-13-2023, 09:11 AM
          4 responses
          59 views
          0 likes
          Last Post DynamicTest  
          Started by ScottWalsh, Today, 06:52 PM
          4 responses
          36 views
          0 likes
          Last Post ScottWalsh  
          Started by olisav57, Today, 07:39 PM
          0 responses
          7 views
          0 likes
          Last Post olisav57  
          Started by trilliantrader, Today, 03:01 PM
          2 responses
          21 views
          0 likes
          Last Post helpwanted  
          Started by cre8able, Today, 07:24 PM
          0 responses
          10 views
          0 likes
          Last Post cre8able  
          Working...
          X