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 love2code2trade, Yesterday, 01:45 PM
          4 responses
          28 views
          0 likes
          Last Post love2code2trade  
          Started by funk10101, Today, 09:43 PM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          37 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          45 views
          0 likes
          Last Post bill2023  
          Started by yertle, Today, 08:38 AM
          6 responses
          26 views
          0 likes
          Last Post ryjoga
          by ryjoga
           
          Working...
          X