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

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 burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          14 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          11 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          14 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,983 views
          3 likes
          Last Post jhudas88  
          Working...
          X