Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I change the Chart Scale at the beginning of a session?

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

    How do I change the Chart Scale at the beginning of a session?

    Hello NT Team,

    I need inside the strategy by clicking on the custom button to change the scale so that the beginning of the Chart was from the beginning of the current trading session and at the same time to return the normal Scale in Y. The strategy works on minutes.

    #2
    Hello tanas.eduard,

    Welcome to the NinjaTrader forums!

    Unfortunately, the chart scales cannot be adjusted directly through code.

    With the Price scale (the Y axis) it is possible to add an indicator that sets the MaxValue/MinValue in OnCalculateMinMax() dynamically. By making this the only chart object with autoscaling enabled, this would allow the indicator to control the scale and range.

    Below is a link to a forum post that discusses.
    I have a summary indicator that collects information from my other indicators and outputs a stack of bubbles that show bullish, bearish or neutral. I need to "fix" the y-axis. For example, If I have 10 stacked bubbles, plotted at values of 1-10, then I want the y-axis to start at -1 and end at 11 so that the top and
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your answer.
      But I have a slightly different problem.
      We have added a button on the Chart, on which a screenshot is made. We need Chat aligned at the beginning of the trading session before pressing the button, because it can be shifted by the user at the moment of pressing.
      By the link status of the Chart at the time of clicking on the button - https://snipboard.io/UslIVr.jpg

      We want the X-axis Chart to be aligned to the beginning of the day and the Y-axis to be aligned to the appropriate scale. A screenshot of how we would like to align - https://snipboard.io/c20Wy4.jpg

      We cant do it from OnCalculateMinMax because button fired event Click​

      Comment


        #4
        Hello tanas.eduard,

        The user would have to adjust this manually. As mentioned in post # 2, the chart scales cannot be adjusted directly through code.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok. Thanks for fast response.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          53 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          130 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          70 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X