Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

lock Right Scale Range to "Automatic"

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

    lock Right Scale Range to "Automatic"

    there is an infuriating feature in NinjaTrader.
    Imagine you set your right scale range to "Automatic" (which is probably how 99.99% of the users have it).

    If you type the up/down arrow key by mistake, it'll change that setting to "Fixed", which means the price chart will no longer adjust automatically to the screen.

    It's extremely irritating. Is there a way to deactivate this?

    In TradingView, there is a similar feature but it's done better, you only trigger the Fixed Range when you actually want to, and there is even an easy 'reset' button to restore the Automatic range without going through menus.

    #2
    Hello FireflyTrader,

    Welcome to the NinjaTrader forums!

    Unfortunately, no such lock exists for NinjaTrader charts.

    I will submit a feature request for the development team to consider this. Once I have a tracking ID for the request I will post in this thread for future reference.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello FireflyTrader,

      Welcome to the NinjaTrader forums!

      Unfortunately, no such lock exists for NinjaTrader charts.

      I will submit a feature request for the development team to consider this. Once I have a tracking ID for the request I will post in this thread for future reference.
      Hi Chelsea

      Thank you very much, I would be very glad if we can deactivate this, or at least give the option to deactivate it (meaning, the arrow keys no longer trigger the switch from "Automatic" to "Fixed").
      It took me a long time to figure it out actually, I was wondering why my charts kept randomly changing to "Fixed".

      I wouldn't necessarily replicate the TradingView behaviour, I think the current implementation is good as it is (except the unwanted change with the arrow keys)

      Comment


        #4
        Hello FireflyTrader,

        Thanks for your notes.

        This feature request is being tracked under the number SFT-6013.

        As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted on the Release Notes page of the Help Guide.

        Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_BrandonH View Post
          Hello FireflyTrader,

          Thanks for your notes.

          This feature request is being tracked under the number SFT-6013.

          As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted on the Release Notes page of the Help Guide.

          Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
          Hi Brandon

          Thank you, I'll keep my fingers crossed!
          I am surprised this wasn't raised before, I can't be the only one that has run into this issue

          Comment


            #6
            NinjaTrader_ChelseaB NinjaTrader_BrandonH

            I hope this is not too off-topic... would it be possible for me to write an indicator that will automatically revert this setting to "Automatic" if it ever becomes "Fixed" after one presses the wrong key?
            Is that possible in NinjaScript?

            Comment


              #7
              Hello ,

              The scaling is not intended to be set by code, but may be possible.

              The ChartScale Properties has a YAxisRangeType property.
              https://ninjatrader.com/support/help...properties.htm

              Note, the help guide warns:
              "Warning: These are UI properties which are designed to be set by a user. Attempting to modify these values through a custom script is NOT guaranteed to take effect."


              That said, the chartScale is provided by OnRender(). Accessing it would look something like:
              Code:
              private ChartScale myChartScale;
              
              protected override void OnBarUpdate()
              {
              if (myChartScale != null)
              {
              myChartScale.Properties.YAxisRangeType = YAxisRangeType.Automatic;
              }
              }
              
              protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
              {
              base.OnRender(chartControl, chartScale);
              
              if (myChartScale != chartScale)
              myChartScale = chartScale;
              }
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                Hello ,
                [...]
                That said, the chartScale is provided by OnRender(). Accessing it would look something like:
                [...]
                Thank you very much!!!
                I am new to NinjaScript (but not to programming) and this is very helpful, I'll give it a go, as this has been driving me nuts

                Comment


                  #9
                  hi NinjaTrader_ChelseaB

                  Thanks again for the snippet of code
                  I tried adding it to an existing indicator and it didn't work yet. No compile error, it just doesn't do anything.
                  Would you mind clarifying the "myChartScale" variable?
                  It seems like a random variable, how/where does it tie up to the active chart in the snippet you provided?

                  on OnBarUpdate(), you make sure it's always set to Automatic Scale, which I understand.
                  What does the OnRender part of your snippet do? should the last line not be inverted, such as chartScale gets assigned the value of myChartScale?

                  I am sure there is something fundamental I am missing, thank you for your help and patience as I get used to NinjaScript

                  Comment


                    #10
                    Hello FireflyTrader,

                    The myChartScale variable is of the type ChartScale and is assigned the chart scale object from OnRender(). OnRender() is an override method that is used for rendering shapes and text on the chart, and provides the chart's chart scale object in the overload parameters.

                    Code:
                    should the last line not be inverted, such as chartScale gets assigned the value of myChartScale?
                    The chartScale overload parameter contains the chart's chartScale object. This is being assigned to the myChartScale variable so that it can be used in OnBarUpdate().
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hello FireflyTrader,
                      Thank you very much, everything is clear now

                      I'll try again, maybe it just doesn't work programmatically

                      Comment


                        #12
                        hi NinjaTrader_ChelseaB
                        Thank you very much, it finally worked!!
                        I know it's such a little thing but it was irritating me so much.

                        It didn't work initially as I added it to an existing helper indicator, and for some reason, it only worked if I deleted and readded the indicator.

                        Thanks again

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by AaronKoRn, Yesterday, 09:49 PM
                        0 responses
                        11 views
                        0 likes
                        Last Post AaronKoRn  
                        Started by carnitron, Yesterday, 08:42 PM
                        0 responses
                        10 views
                        0 likes
                        Last Post carnitron  
                        Started by strategist007, Yesterday, 07:51 PM
                        0 responses
                        11 views
                        0 likes
                        Last Post strategist007  
                        Started by StockTrader88, 03-06-2021, 08:58 AM
                        44 responses
                        3,981 views
                        3 likes
                        Last Post jhudas88  
                        Started by rbeckmann05, Yesterday, 06:48 PM
                        0 responses
                        9 views
                        0 likes
                        Last Post rbeckmann05  
                        Working...
                        X